Code Monkey home page Code Monkey logo

Comments (8)

KingWu avatar KingWu commented on May 22, 2024

i can access the API. Seems there exist a restriction on your country to access the api

from flutter_starter_kit.

tausiq avatar tausiq commented on May 22, 2024

oh I see. Could you please comment the link of the iTunes API documentation that you used?

I couldn't find this particular format you used, all I found is the following format,
https://rss.itunes.apple.com/api/v1/us/ios-apps/top-free/all/100/explicit.json

Thank you.

from flutter_starter_kit.

KingWu avatar KingWu commented on May 22, 2024

Added the api json response in the documents

https://docs.google.com/document/d/1uEuWbAhCt6mxPfh9m5EegUvCo1fv4AsqjKFv6kE0ALg/edit?usp=sharing

Hope can help you

from flutter_starter_kit.

tausiq avatar tausiq commented on May 22, 2024

Thank you for sharing the response.

Actually I wanted the API documentation itself, i.e. all the possible APIs that can be used. For example, how do you know the following link will work?
https://itunes.apple.com/hk/rss/topfreeapplications/limit=100/json

There should be a page where it says the above formatted API request will work. Do you have such page link? if yes, please share.

from flutter_starter_kit.

KingWu avatar KingWu commented on May 22, 2024

I think the json format from this url
https://rss.itunes.apple.com/api/v1/us/ios-apps/top-free/all/100/explicit.json

which is the same as the json format response from
https://itunes.apple.com/hk/rss/topfreeapplications/limit=100/json

I did not find any api spec for the api. I just analysis the json response from the api to capture the pojos.

Why i know the link is work? Because i just copy and paste the link to browser to run it. i get the response. Also, run the starter kit demo again. It works. So, i think you can't access the link at your region.

from flutter_starter_kit.

tausiq avatar tausiq commented on May 22, 2024

Okay I got it. Thank you for your responses :-)

from flutter_starter_kit.

itmanzzz avatar itmanzzz commented on May 22, 2024

Just update ur API link like KingWu.
image
The API will work

from flutter_starter_kit.

tausiq avatar tausiq commented on May 22, 2024

@izitechworld
I am not so sure. Have you tried to run the app and it works for you? Cause the API response format is different. I don't think it will work out of the box just by updating the link.

Current implementation expects the following format,

{
  "feed": {
    "author": {
      "name": {
        "label": "iTunes Store"
      },
      "uri": {
        "label": "http://www.apple.com/itunes/"
      }
    },
    "entry": [
      {
        "im:name": {
          "label": "..."
        },
        "rights": {
          "label": "..."
        },
        "im:price": {
          "label": "Get",
          "attributes": {
            "amount": "0.00000",
            "currency": "USD"
          }
        },

Whereas the updated link returns,

{
  "feed": {
    "title": "Top Free iPhone Apps",
    "id": "https://rss.itunes.apple.com/api/v1/us/ios-apps/top-free/all/100/explicit.json",
    "author": {
      "name": "iTunes Store",
      "uri": "http://wwww.apple.com/us/itunes/"
    },
    "links": [
      {
        "self": "https://rss.itunes.apple.com/api/v1/us/ios-apps/top-free/all/100/explicit.json"
      },
      {
        "alternate": "https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?genreId=36\u0026popId=27"
      }
    ],
    "copyright": "Copyright © 2018 Apple Inc. All rights reserved.",
    "country": "us",
    "icon": "http://itunes.apple.com/favicon.ico",
    "updated": "2019-06-30T01:53:34.000-07:00",
    "results": [
      {
        "artistName": "Voodoo",
        "id": "1453989822",
        "releaseDate": "2019-02-28",
        "name": "aquapark.io",
        "kind": "iosSoftware",
        "copyright": "© 2019 Cassette LLC",
        "artistId": "714804730",
        "artistUrl": "https://apps.apple.com/us/developer/voodoo/id714804730",
        "artworkUrl100": "https://is4-ssl.mzstatic.com/image/thumb/Purple123/v4/60/73/2f/60732fce-e01a-cb2e-e933-cbd9eabf29de/AppIcon-0-1x_U007emarketing-0-85-220-0-7.png/200x200bb.png",
        "genres": [
          {
            "genreId": "6014",
            "name": "Games",
            "url": "https://itunes.apple.com/us/genre/id6014"
          },

I think we need to update the response pojo class. Please correct me if I am wrong.

from flutter_starter_kit.

Related Issues (18)

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.