Giter Site home page Giter Site logo

Comments (11)

danieltanfh95 avatar danieltanfh95 commented on August 30, 2024

Should the end JSON look like this example:

{
  type: "Light novel",
  language: "English",
  titles: [
              Zero_No_Tsukaima,
              Date_A_Live
            ]
}

from btapi.

Nandaka avatar Nandaka commented on August 30, 2024

It is better to add the actual title too, not only the page id (the wiki page with _) as sometimes there are multiple alias/redirect to the same page title.

{
  type: "Light novel",
  language: "English",
  titles: [
              { "Zero_No_Tsukaima": "Zero no Tsukaima" },
              { "Date_A_Live" : "Date a Live" }
            ]
}

or with data structure for easy parsing.

{
  type: "Light novel",
  language: "English",
  titles: [
              { page: "Zero_No_Tsukaima", title: "Zero no Tsukaima" },
              { page: "Date_A_Live", title: "Date a Live" }
            ]
}

from btapi.

danieltanfh95 avatar danieltanfh95 commented on August 30, 2024

Should both options be present at the same time or would one be optional?

from btapi.

Nandaka avatar Nandaka commented on August 30, 2024

No, just provide either one. It is better to have standardized api.

Personally, I prefer the 2nd one.

from btapi.

danieltanfh95 avatar danieltanfh95 commented on August 30, 2024

I've done both, but to keep things simple for the 2nd one, it only provides the types available for a particular language, or the languages available for a particular type, which the application can then plug back into the original API.

from btapi.

Nandaka avatar Nandaka commented on August 30, 2024

Found the wiki api for this one:
http://www.baka-tsuki.org/project/api.php?action=query&prop=info|revisions&generator=categorymembers&gcmlimit=500&gcmtype=page&format=json&gcmtitle=Category:Light_novel_(English)

it got the actual pageid and the lastrevid, which is good for checking any for updates...

do you want to call to this api and transform it to given format?

from btapi.

danieltanfh95 avatar danieltanfh95 commented on August 30, 2024

Thanks. I was wondering how could we get the last revised date...
May I know can the pageid be utilised?
I think I will switch the type&lang url to this one for the lastrevid.

from btapi.

Nandaka avatar Nandaka commented on August 30, 2024

last revised date

use the timestamp from the revision node

pageid

should use it, as the page title might be changed, but the id will not.

from btapi.

danieltanfh95 avatar danieltanfh95 commented on August 30, 2024

For the last revised date, is it relative to the server or?

from btapi.

Nandaka avatar Nandaka commented on August 30, 2024

it is using zulu timezone or in other word UTC+0

"timestamp": "2014-09-28T05:53:12Z"

if possible, use the same format.

from btapi.

danieltanfh95 avatar danieltanfh95 commented on August 30, 2024

I think I will preserve the timestamp and leave it to the dev to parse it according to their liking.

http://btapi-shadowys.ngapp.io/api/category?type=LIGHT_NOVEL&language=ARABIC

from btapi.

Related Issues (20)

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.