GET
/
articles
curl --request GET \
  --url https://jotihunt.nl/api/2.0/articles
{
  "data": [
    {
      "id": 123,
      "title": "<string>",
      "type": "news",
      "publish_at": "2023-11-07T05:31:56Z",
      "message": {
        "content": "<string>"
      }
    }
  ],
  "links": {
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next": "<string>"
  },
  "meta": {
    "current_page": 123,
    "from": 123,
    "last_page": 123,
    "links": [
      {
        "url": "<string>",
        "label": "<string>",
        "active": true
      }
    ],
    "path": "<string>",
    "per_page": 123,
    "to": 123,
    "total": 123
  }
}

Use Cases

The /articles endpoint allows you to retrieve all published articles from the Jotihunt platform. Here are some common use cases:

  • Game Updates: Display the latest news and announcements on your team’s dashboard.
  • Event Timeline: Create a chronological timeline of all important event announcements.
  • Notification System: Implement a notification system to alert your team about new articles.
  • Content Aggregation: Incorporate Jotihunt articles into your team’s custom application.

Code Examples

// Using fetch to retrieve all published articles
fetch('https://jotihunt.nl/api/articles')
  .then(response => response.json())
  .then(data => {
    console.log('Articles:', data);
    // Process articles - e.g., display the most recent ones
    const recentArticles = data.slice(0, 5);
    recentArticles.forEach(article => {
      console.log(`${article.title} - ${article.publish_at}`);
    });
  })
  .catch(error => {
    console.error('Error fetching articles:', error);
  });

Query Parameters

page
integer
default:1

Page number for pagination

per_page
integer
default:15

Number of articles per page

Response

200
application/json

Articles response with pagination

The response is of type object.