#%RAML 1.0
---
baseUri: 'http://127.0.0.1/'
version: v1
title: PSX
/population/popo:
  description: 'Collection endpoint'
  get:
    queryParameters:
      startIndex:
        type: integer
        required: false
      count:
        type: integer
        required: false
    responses:
      200:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationCollectionPopoGet200Response
  post:
    body:
      application/json:
        type: 1
    responses:
      201:
        body:
          application/json:
            type: PSXFrameworkAppApiPopulationCollectionPopoPost201Response
types:
  Collection: { description: 'Collection result', type: object, properties: { totalResults: { type: integer }, entry: { type: array, items: { $ref: '#/types/Entity' } } } }
  DogetQuery: { type: object, properties: { startIndex: { type: integer }, count: { type: integer } }, required: {  } }
  Entity: { description: 'Represents an internet population entity', type: object, properties: { id: { description: 'Unique id for each entry', type: integer }, place: { description: 'Position in the top list', type: integer, minimum: 1, maximum: 64 }, region: { description: 'Name of the region', type: string, pattern: '[A-z]+', minLength: 3, maxLength: 64 }, population: { description: 'Complete number of population', type: integer }, users: { description: 'Number of internet users', type: integer }, worldUsers: { description: 'Percentage users of the world', type: number }, datetime: { description: 'Date when the entity was created', format: date-time, type: string } }, required: [place, region, population, users, worldUsers] }
  Message: { title: message, description: 'Operation message', type: object }
  PSXFrameworkAppApiPopulationCollectionPopoGet200Response: { $ref: '#/types/Collection' }
  PSXFrameworkAppApiPopulationCollectionPopoPost201Response: { $ref: '#/types/Message' }
  PSXFrameworkAppApiPopulationCollectionPopoPostRequest: { $ref: '#/types/Entity' }
