After clawing back some territory yesterday, I’m back in the doldrums.
If I’m honest with myself, I think I’ve been trying to cut corners and do things fast. I figured I could just slap the api response objects into data and it’d all be there for access later.
Now I’m thinking I need to backpeddle and populate the data object in a much more methodical way.
I need to create an object class that has the specific properties I need and then populate that with the results of each API call, I think.
It might even be time to take a look at the Udacity OOP course before I continue.
What I was right about was doing the UI first! The thought of trying to hammer that out after going through all these logic hangups is just soul-destroying!
If I don’t make significant progress in the next hour or two I’m going to put this on hold and do the OOP course.
from users:
name
display_name
logo
from streams:
null ||
game
preview.medium
OK. Done all that. Works fine. Much more manageable. The user data is managed on api resolve, so it can construct user objects for null responses - these can now be rendered appropriately (I’ve yet to add all the logic).
That wasn’t so hard!
Now I need to update my filter functions and I should be pretty near the end.
Hyperlinks. I need to add those.
Day 6
05:42
Took a bit longer to rework the filter function than I thought. I was hungover, engaging in the code pod meetup and generally not focused.
Eventually realised that I was pushing my .filter
output to an array when .filter
already returns an array. D’Oh!.
Now I need to sort the scaling on the images I’m using when people are streaming or not.
DECISION: I am currently trying to use a “no broadcast” icon for not and a screengrab url from the API if the user is streaming. This is a random, last minute change I included ‘cause I thought it would be cool. I need to abandon that for my 2 identically-sized icons. It is not a functional requirement, whereas I have other features that are.
That is the correct thing to do!