Mester / demo-day-vikings

The Unlicense
2 stars 1 forks source link

Get connected to the API #15

Closed bdauer closed 8 years ago

bdauer commented 8 years ago
Mester commented 8 years ago

Some sort of utility module might be a good idea for this so we don't have all the code in our views.

jasonmeeks commented 8 years ago

Currently only getting a short list of song names and the Genres are inconsistent. we need to find a way to get a longer list or find a different API request that will search the subreddit for specific genre names

bdauer commented 8 years ago

Did some googling and found this as an option to get everything from a subreddit (up to the 1000 post limit):

` sub = r.get_subreddit('your sub') posts = sub.get_new(limit=None) for x in posts:

do thing to each submission`

Not sure it'll work but if we focus on pulling more posts, we can deal with parsing the JSON files after. These are the steps that I would take:

Some of those steps could break into smaller steps. There's probably more than one way to tackle the problem but that's how I'd do it in broad strokes.

bdauer commented 8 years ago

Also may want to make sure that we're only testing that the brackets contain the genre, since a lot of the times there's multiple keywords. And might be good to create test data once we know how the json is formatted. That way we'll get consistent results when we're trying to get it working. My 2c. Hope some of it's helpful.