Code Monkey home page Code Monkey logo

friendcaster-server's People

Contributors

kevinmost avatar mbstavola avatar

Watchers

 avatar

Forkers

mbstavola

friendcaster-server's Issues

First API hit after a while will return 500 error

The way Heroku works, if our API hasn't been hit in a while, all of its data will be unloaded from memory. When it's reloaded back into memory, we hit the official SBFC feed and parse it out into our own data-model. However, the first time we hit their server, since our refreshes are done asynchronously, we return an object that has not yet been populated, so we return a null object, and get a 500 error.

We should probably block in the Friendcachester's get method until the data-model is not null.

Duration missing from most episodes

The expected contents of an episode is something like:

{
  "map" : {
    "link" : "http://superbestfriendsplay.com/podcast/sbfc-120-super-bunny-dumps-feat-superbunnyhop/",
    "dc:creator" : "Woolie",
    [. . .]
    "duration" : 14477,
    "enclosure" : { [. . .] },
    [. . .]
  }
}

Yet it appears as though the duration field is only present for the first three episodes in the response (page 0); the duration field is entirely missing from most episode jsons.

Off-by-one in pagination

The first episode of the Friendcast doesn't show up when you use the paginated version of the feed.

Flatten (and clean) api response

The current api response is super nested. For example:

{
    "map": {
        "hasNext": true,
        "episodes": {
        "myArrayList": [
            {
                "map": {
                    "link": "http://superbestfriendsplay.com/podcast/sbfc-109-tassadars-butthole/",
                    "dc:creator": "Woolie",
                    "description": "<p>Download for Mobile Devices Preview Video &#124; RSS Lots of Metal Gear and Until Dawn talk this<span class=\"blogmore\">more ›<\/span><\/p>\n<p>The post <a rel=\"nofollow\" href=\"http://superbestfriendsplay.com/podcast/sbfc-109-tassadars-butthole/\">SBFC 109: Tassadar&#8217;s Butthole<\/a> appeared first on <a rel=\"nofollow\" href=\"http://superbestfriendsplay.com\">Super Best Friends Play<\/a>.<\/p>\n",
                    "title": "SBFC 109: Tassadar&#8217;s Butthole",
                    "pubDate": "Tue, 08 Sep 2015 02:16:13 +0000",
                    "itunes:explicit": "No",
                    "itunes:duration": "0:00",
                    "itunes:block": "No",
                    "itunes:summary": "Download for Mobile Devices\r\n\r\nPreview Video | RSS\r\n\r\nLots of Metal Gear and Until Dawn talk this week, but dont fret, its completely spoiler free!\r\n\r\nOutro: Nuclear Throne OST - Main Theme\r\n\r\n\tSonicFox vs Perfect Legend, MKX grudge match ends 13-0\r\n\tArcSys is planning to poll players on what characters should join Xrd. You know what to do. (BAIKEN)\r\n\tMotion sickness and difficulty make Miyamoto hesitant with Mario Galaxy 3\r\n\tPikmin 4 in development and very close to completion\r\n\tHalo composer Marty ODonnell wins Bungie legal battle\r\n\tUbisoft plans to open a theme park in Malaysia in 2020\r\n\tA young boy stares out over a dilapidated city in this wonderful piece of concept art for #NieRNewProject \r\n\tMortal Kombat X to get four new DLC characters in 2016\r\n\tFreedom Planet devs found the Wii U holdup, still on the way\r\n\tStar Fox, Kirby and Warrior Princess Peach were almost Skylanders\r\n\tA “MEGA MAN” MOVIE IS A GO AT FOX\r\n\tYu Suzuki Hired A Fan He Met In A Thai Restaurant To Work On Shenmue 3\r\n\tRon Gilbert really wants Disney to sell him the Monkey Island IP\r\n\tIt’s Letter Time\r\n\tThe WATCH\r\n\tWhat’s happening on the site?",
                    "enclosure": {
                        "map": {
                            "length": 1,
                            "type": "audio/mpeg",
                            "url": "http://traffic.libsyn.com/superbestfriendcast/SBFC109.mp3"
                        }
                    }
                },
                "guid": {
                    "map": {
                        "isPermaLink": false,
                        "content": "http://superbestfriendsplay.com/?post_type=podcast&#038;p=10322"
                    }
                },
                "content:encoded": "<p><a href=\"http://traffic.libsyn.com/superbestfriendcast/SBFC109.mp3\">Download for Mobile Devices<\/a><\/p>\n<p><a href=\"http://youtu.be/EKmFEix8HXU\">Preview Video<\/a> | <a href=\"http://superbestfriendsplay.com/?feed=podcast\">RSS<\/a><\/p>\n<p>Lots of Metal Gear and Until Dawn talk this week, but don&#8217;t fret, it&#8217;s completely spoiler free!<\/p>\n<p>Outro: Nuclear Throne OST &#8211; Main Theme<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><a href=\"http://shoryuken.com/2015/09/01/sonic-fox-defeats-perfect-legend-10-0-3-0-at-summer-jam-9/\"><span style=\"font-weight: 400;\">SonicFox vs Perfect Legend, MKX grudge match ends 13-0<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://shoryuken.com/2015/09/04/shoryuken-poll-who-should-join-guilty-gear-xrd-revelator-s-cast/\"><span style=\"font-weight: 400;\">ArcSys is planning to poll players on what characters should join Xrd. You know what to do. (BAIKEN)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.eurogamer.net/articles/2014-08-17-super-mario-galaxy-3-opportunity-as-hardware-technology-gets-better-and-advances\"><span style=\"font-weight: 400;\">Motion sickness and difficulty make Miyamoto hesitant with Mario Galaxy 3<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.eurogamer.net/articles/2014-07-20-pikmin-4-in-development-and-very-close-to-completion\"><span style=\"font-weight: 400;\">Pikmin 4 in development and &#8220;very close to completion&#8221;<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.eurogamer.net/articles/2015-09-07-halo-composer-marty-odonnell-wins-bungie-legal-battle\"><span style=\"font-weight: 400;\">Halo composer Marty O&#8217;Donnell wins Bungie legal battle<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.eurogamer.net/articles/2015-09-07-ubisoft-plans-to-open-a-theme-park-in-malaysia-in-2020\"><span style=\"font-weight: 400;\">Ubisoft plans to open a theme park in Malaysia in 2020<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"https://twitter.com/platinumgames/status/638900165248593920\"><span style=\"font-weight: 400;\">A young boy stares out over a dilapidated city in this wonderful piece of concept art for #NieRNewProject <\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.eurogamer.net/articles/2015-09-03-mortal-kombat-x-to-get-four-new-dlc-characters-in-2016\"><span style=\"font-weight: 400;\">Mortal Kombat X to get four new DLC characters in 2016<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.nintendolife.com/news/2015/09/freedom_planet_wii_u_fix_making_progress_galaxytrail_aiming_to_reveal_release_date_soon\"><span style=\"font-weight: 400;\">Freedom Planet devs found the Wii U holdup, still on the way<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.destructoid.com/star-fox-and-kirby-were-almost-skylanders-309212.phtml\"><span style=\"font-weight: 400;\">Star Fox, Kirby and Warrior Princess Peach were almost Skylanders<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.tracking-board.com/tb-exclusive-a-mega-man-movie-is-a-go-at-fox/\"><span style=\"font-weight: 400;\">A “MEGA MAN” MOVIE IS A GO AT FOX<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.siliconera.com/2015/09/03/yu-suzuki-hired-a-fan-he-met-in-a-thai-restaurant-to-work-on-shenmue-3/\"><span style=\"font-weight: 400;\">Yu Suzuki Hired A Fan He Met In A Thai Restaurant To Work On Shenmue 3<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><a href=\"http://www.destructoid.com/ron-gilbert-really-wants-disney-to-sell-him-the-monkey-island-ip-309180.phtml\"><span style=\"font-weight: 400;\">Ron Gilbert really wants Disney to sell him the Monkey Island IP<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\">It’s Letter Time<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The WATCH<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">What’s happening on the site?<\/span><\/li>\n<\/ul>\n<p>The post <a rel=\"nofollow\" href=\"http://superbestfriendsplay.com/podcast/sbfc-109-tassadars-butthole/\">SBFC 109: Tassadar&#8217;s Butthole<\/a> appeared first on <a rel=\"nofollow\" href=\"http://superbestfriendsplay.com\">Super Best Friends Play<\/a>.<\/p>\n",
                "itunes:subtitle": "Download for Mobile Devices Preview Video | RSS Lots of Metal Gear and Until Dawn talk thismore ›",
                "itunes:author": "Woolie"
            },
        ]
    }
}

The client app has to drill down pretty far to get any useful information, making it really annoying to work with. Additionally, a lot of this data is fluff and probably won't be used anyway.

It would be nice to get responses in a format like this instead:

{
    "hasNext" : true,
    "episodes" : [
        {
            "link" : "http://superbestfriendsplay.com/podcast/sbfc-120-super-bunny-dumps-feat-superbunnyhop/",
            "title" : "SBFC 120: Super Bunny Dumps (feat. SuperBunnyHop)",
            "pubDate" : "Tue, 24 Nov 2015 05:00:26 +0000",
            "duration" : 14477,
            "url" : "http://traffic.libsyn.com/superbestfriendcast/SBFC120.mp3",
            "type" : "audio/mpeg",
        }
    ]
}

A lot cleaner to work with and read!

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.