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

BE API Endpoint 1 #2

Open
hwryan12 opened this issue Apr 11, 2023 · 0 comments
Open

BE API Endpoint 1 #2

hwryan12 opened this issue Apr 11, 2023 · 0 comments
Assignees

Comments

@hwryan12
Copy link
Collaborator

hwryan12 commented Apr 11, 2023

GET /chordsapi/v1/themes/#{Theme.all.first.id}/characters/find_character?good_evil={Float_to_be_provided}&lawful_chaotic={Float_to_be_provided}

when I visit this endpoint with valid quiz answers,
I receive back a JSON object,
somewhere in the json is the character in the form of a string,
dnd alignment as a string
And a link to an image of the character,
and the name of the quiz the character is from,

RESPONSE:

{
  "links": {
    "image": "http://example.com/vaderpic"
  },
  "data": {
    "type": "character",
    "id": "1",
    "attributes": {
      "name": "Darth Vader",
      "quiz": "Star Wars",
      "alignment": "Neutral Evil"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants