Skip to content

DaftMobile/switter

Repository files navigation

iOS 4 Beginners

License: MIT Platform: Vapor Swift: 4.0

Switter API

URL = https://switter.app.daftmobile.com/

Authorization

  • Basic - x-device-uuid header

Authorization errors

  • Basic - Error Code 400 - You will receive it when:
    • x-device-uuid header is missing

API

Hello

  • GET /api/hello

Required authentication: None

Example valid response: 200

Hello world!

Joke

  • GET /api/joke

Required authentication: Basic

Example valid response: 200

{
  "content": "This is a joke"
}

Pokemon Index

  • GET /api/pokemon

Required authentication: Basic

Example valid response: 200

[
  {
    "color": 8570017,
    "name": "Bulbasaur",
    "number": 1
  },
  {
    "color": 8961217,
    "name": "Unknown",
    "number": 2
  }
]

Pokemon GET by Number

  • GET /api/pokemon/:number

Required authentication: Basic

Example valid response (/api/pokemon/1): 200

{
  "name": "Bulbasaur",
  "number": 1,
  "color": 8570017
}

Pokemon not found: 404

Pokemon GET by Name

  • GET /api/pokemon/:name

Required authentication: Basic

Example valid response (/api/pokemon/bulbasaur): 200

{
  "name": "Bulbasaur",
  "number": 1,
  "color": 8570017
}

Pokemon not found: 404

Pokemon Thumbnail

  • GET /api/pokemon/:number/thumbnail

Required authentication: Basic

Returns a thumbnail png image representing the requested Pokemon (size 124x114 px) 200

Pokemon not found: 404

Pokemon Image

  • GET /api/pokemon/:number/image

Required authentication: Basic

Returns a full png image representing the requested Pokemon 200

Pokemon not found: 404

Catch a Pokemon

  • POST /api/pokemon/:number/catch

Required authentication: Basic

Example valid response (/api/pokemon/1/catch): 200

{
  "name": "Bulbasaur",
  "number": 1,
  "color": 8570017
}

Pokemon PEEK by Number

  • GET /api/pokemon/:number/peek

Required authentication: NONE

Example valid response (/api/pokemon/1/peek): 200

{
  "name": "Bulbasaur",
  "number": 1,
  "color": 8570017
}

Pokemon not found: 404

Pokemon PEEK by Name

  • GET /api/pokemon/:name/peek

Required authentication: NONE

Example valid response (/api/pokemon/bulbasaur): 200

{
  "name": "Bulbasaur",
  "number": 1,
  "color": 8570017
}

Pokemon not found: 404

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages