GET
/
areas
curl --request GET \
  --url https://jotihunt.nl/api/2.0/areas
{
  "data": [
    {
      "name": "<string>",
      "status": "green",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

The status property can be one of the following:

  • green - The area is active and can be hunted.
  • red - The area is inactive and cannot be hunted.
  • orange - The area is going to be red soon. But can still be hunted.

Use Cases

The /areas endpoint provides information about all the hunting areas in the Jotihunt game. Here are some practical use cases:

  • Interactive Maps: Create custom maps showing the boundaries of each hunting area.
  • Team Strategy: Develop strategies based on area information and team locations.
  • Location Tracking: Track which areas your team has visited or needs to visit.
  • Area Status Monitoring: Monitor status changes of different areas throughout the game.

Code Examples

// Using fetch to retrieve areas and map them
fetch('https://jotihunt.nl/api/areas')
  .then(response => response.json())
  .then(data => {
    console.log(`Retrieved ${data.length} areas`);
    
    // Example: Creating a map of area names to their coordinates
    const areaMap = {};
    data.forEach(area => {
      areaMap[area.name] = {
        latitude: area.latitude,
        longitude: area.longitude,
        status: area.status
      };
    });
    
    // Log areas with a specific status
    const activeAreas = data.filter(area => area.status === 'green');
    console.log(`Active areas: ${activeAreas.map(a => a.name).join(', ')}`);
  })
  .catch(error => {
    console.error('Error fetching areas:', error);
  });

Response

200
application/json

Areas response

The response is of type object.