Skip to content

seandonn-boston/into-api

Repository files navigation

RailsGeneral Assembly Logo

INTO API

https://github.com/seandonn-boston/into-client https://seandonn-boston.github.io/into-client/#/ https://github.com/seandonn-boston/into-api https://into-api.herokuapp.com/

An explanation of the what the app does and how it works.

INTO pulls data from all your favorite media streaming services like Spotify, Netflix, Steam, and Audible and examines what you've been "into" recently. As a user of INTO, you can generate a 3x3 image of you everything you've been into over the past 7 days.

INTO is (will be*) connected to 3rd party API's in order to gather the necessary information to create a collage. Users must authenticate their accounts first via the acocunts tab, and then navigate back to the homepage to generate a collage. The collage generation engine will pull data from each of the users connected accounts and determine what the user has spent the most time doing - perhaps they've been binge watching a Netflix show, or can't get enough of Kanye's latest album, or have been playing Fortnite all night. Whatever it is that you're into, INTO will grab the album cover/tv poster/game cover of your top 9 things from the past 7 days and make a collage image to share on Instagram, Tinder, and more.

Instructions

  1. Fork and clone this repository.
  2. Change into the new directory.
  3. Run bundle install to install dependencies
  4. Create and checkout a new branch, named into-api-fork.
  5. When finishing changes, push to your fork and submit a pull request

List of technologies used

  • Git
  • Github
  • Grunt
  • HTML5
  • Bootstrap
  • Handlebars
  • CSS3
  • JavaScript
  • Ruby
  • Rails
  • Heroku
  • Ember.js
  • jQuery
  • AJAX
  • Spotify Web API

List unsolved problems which would be fixed in future iterations.

Next Steps include:

  • Connecting to the Spotify API (POC)
  • Extrat 7 days of user history data
  • Filter through all history - establish the top 9 albums that user listened to that week
  • Order top 9 by amount of time spent listening per album (album1: 2hrs, album2: 1.5hrs, album3: 1.2hrs, etc)
  • Pull the album cover of these top 9 albums
  • Arrange the album covers in a 3x3 grid, left to right and top to bottom (most-time to least).
  • Convert this 3x3 grid into a jpeg or png
  • Provide links to share or download
  • Extra stretch steps:
  • Store the image into AWS
  • Display the images as a hsitory for the user
  • Allow user to delete individual items (maybe the user doesn't want to share the fact that they've been listening to Kidz Bop 4 for 12 hours this week - provide them a chance to remove and replace before sharing/saving/downloading)
  • Connect Netflix, Google Play, Amazon, Audible, Steam, PSN, Xbox, etc

Document your planning, process and problem-solving strategy

Settings

  • As a user, I want to connect accounts by username
  • As a user, I want to remove accounts
  • As a user, I want to update account names

Generator

  • As a user, I want to create a collage

  • Parameters include grid size (3x3, 4x4, 5x5), time frame (1 week, 1 month, 3 months, 6 months, 1 year, all time), and content type (all, music, tv, movies, games, podcasts, books, etc). Title option available but not required - default title is "3x3_7days_all"

  • As a user, I want to read all my saved collages (view history)

  • As a user, I want to update my collage (settings, title, and generated output)

  • As a user, I want to download collages as images

  • As a user, I want to delete my collages

Stretch user stories

  • As a user, I want to share collages with Twitter, Instagram, and Tinder
  • As a user, I want to publish my collages to a social media feed.

Screenshot of INTO: screenshot of INTO app - successful update

Process:

  • Create backend, CURL, test, deploy
  • Connect backend tables to Ember
  • Finish requirements for class purposes
  • Connect to Spotify API (in progress)
  • Create collage generation engine (not started)

Problem-solving strategies:

Catalog of Routes (paths and methods) that the API expects

  • Index

    • Request

    • Response

      • Status
        • 200, OK
      • Body
        {accounts: [
            "account": {
              "service": "'"${SERVICE}"'",
              "username": "'"${USERNAME}"'"
            }]
        }
        
        • The response body will be an accounts object that contains an array of all of your accounts because this is a protected controller. There will be other attributes such as date and owner associated with each account.
  • Create

    • Request

      --request POST \
      --header "Authorization: Token token=${TOKEN}" \
      --header "Content-Type: application/json" \
      --data '{
        "account": {
          "service": "'"${SERVICE}"'",
          "username": "'"${USERNAME}"'"
        }
      }'
      
    • Response

      • Status
        • 201, Created
      • Body
      {accounts: [
          "account": {
            "service": "'"${SERVICE}"'",
            "username": "'"${USERNAME}"'"
          }]
      }
      
  • Update

    • Request

      • Verb
        • PATCH
      • url
        -https://into-api.herokuapp.com/accounts/:id
      • Body
        --request PATCH \
        --header "Content-Type: application/json" \
        --header "Authorization: Token token=${TOKEN}" \
        --data '{
          "account": {
            "service": "'"${SERVICE}"'",
            "username": "'"${USERNAME}"'"
          }
        }'
        
    • Response

      • Status
        • 204, No Content
      • Body
        • n/a
  • Destroy

About

INTO - an app for analyzing your recent media consumption; repo of client facing code

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors