Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entender a API #4

Closed
3 tasks done
ericklborges opened this issue Feb 8, 2021 · 4 comments
Closed
3 tasks done

Entender a API #4

ericklborges opened this issue Feb 8, 2021 · 4 comments
Milestone

Comments

@ericklborges
Copy link
Owner

ericklborges commented Feb 8, 2021

  • Mapear endpoints
  • Mapear modelos
  • Gerar api-key
@ericklborges ericklborges added this to the Setup milestone Feb 8, 2021
@ericklborges
Copy link
Owner Author

API não possui autenticação

@ericklborges
Copy link
Owner Author

Host

https://api.chucknorris.io/jokes

  • Listagem de categorias: /categories
  • Query: /search?query={query}

@ericklborges
Copy link
Owner Author

ericklborges commented Feb 10, 2021

Fact

struct Fact: Codable {
    let id: String
    let value: String
    let categories: [String]
    let createdAt: String // não vou usar
    let iconURL: String // não vou usar
    let updatedAt: String // não vou usar
    let url: String
}

@ericklborges
Copy link
Owner Author

FactsQuery

struct FactsQuery: Codable {
    let total: Int
    let result: [Fact]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant