Giter Club home page Giter Club logo

character_chords_back_end's People

Contributors

hadyematar23 avatar hwryan12 avatar jtaylor28 avatar sandfortw avatar

Watchers

 avatar

character_chords_back_end's Issues

BE API Endpoint 3

POST chordsapi/v1/playlist_create?character_id={CHARACTER_ID}&playlist_id={PLAYLIST_ID}

NOTE:The front end will also be sending the authorization token and whatever else needed to modify a user's playlist

When I go to this endpoint,
A playlist is created in spotify,
and I receive a link back to open the playlist in spotify

TO-DO: Update this with the JSON response.

Extension 4: Testing

Improve the upon the robustness of feature tests. Include sad paths and edge cases where applicable

BE API Endpoint 1

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"
    }
}

BE API Endpoint 2

POST /chordsapi/v1/themes/#{theme_id}/characters/#{character.id}/playlists?genre=hip-hop

this end point should return a playlist with a list of 10 songs in the following format (and add that playlist as a playlist object to the DB- in incremental order)

{
  "links": {
   " image": "http://example.com/vaderpic"
  },
  "data": [{
    "type": "character",
    "id": "1",
    "attributes": {
      "name": "Darth Vader",
      "quiz": "Star Wars",
      "alignment": "Neutral Evil"
    },

   {
    "type": "playlist",
     "attributes":{
       "id": "1"                             
       "titles": "["Song1", "Song2", "Song3", "Song4"]"
       }
   }]
}

BE OpenAI Testing

Improve testing for service and facade for OpenAI playlist generation

Explanation on the Home Page

Need explanation on the home page on how to work this program. (i.e. take the test and then input a music choice and receive a playlist.)

BE API Endpoint 0

GET chordsapi/v1/themes/:theme_id/questions

{
  {
  "links": {
   " image": "http://example.com/quizimage"
  },
  "data": [
    {
    "type": "question",
    "id": "1",
    "attributes": {
      "name": "What would you do if an underling defied you?",
      "quiz": "Star Wars",
      "answers": [
                           {"A": {"text": "Negotiate a compromise", "value": 1}}, 
                           {"B": {"text": "Ask them again to do as you say", "value": 2}}, 
                           {"C": {"text": "Use the force to throw them across the room", "value": 3}},
                           {"D": {"text": "foo", "value": 4}}, 
                           {"E": {"text": "bar", "value": 5}}


                          ] 
    },

 {
    "type": "question",
    "id": "2",
    "attributes": {
      "name": "Are you a nice guy?",
      "quiz": "Star Wars",
      "answers": [
                           {"A": {"text": "Yes", "value": 1}}, 
                           {"B": {"text": "Kinda", "value": 2}}, 
                           {"C": {"text": "No", "value": 3}},
                           {"D": {"text": "foo", "value": 4}}, 
                           {"E": {"text": "bar", "value": 5}}
                          ] 
    }
  ]
}

BE API Endpoint 2.5

GET "/chordsapi/v1/themes/:theme_id/characters/:character_id/playlists/:playlist_id"

This will output in JSON the serialized playlist object that had been created by the POST action

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.