lainchan / lainchan

The version of vichan running on lainchan.org
Other
520 stars 98 forks source link

Support for boards.json #82

Open kwong93 opened 7 years ago

kwong93 commented 7 years ago

https://lainchan.org/boards.json

Appleman1234 commented 7 years ago

https://github.com/vichan-devel/vichan-API says

http(s)://siteurl/board/threads.json

A list of boards is exposed at the following URL: (nb. this is not yet implemented, it may work on individual sites)

What is this needed for ?

f0x52 commented 7 years ago

it's used for alternative clients (mainly mobile imageboard viewing apps)

Appleman1234 commented 7 years ago

I am still waiting for elaboration for why this is needed.

However the following similar request was made in the Feature Request post in /q/.

Implement /boards. Vichan supports having channame.tld/boards.html as a list of all boards. Unfortunately, lainchan.org/boards.html is a 404. Could this be changed? It would be good for discovery.

ParkerK commented 6 years ago

@Appleman1234 it's so scripts / mobile apps using the lainchan (vichan) API can see the available boards and their titles.

catamphetamine commented 5 years ago

I am still waiting for elaboration for why this is needed.

It's for displaying the list of available boards in mobile clients, obviously.

it's so scripts / mobile apps using the lainchan (vichan) API can see the available boards and their titles.

^ what he said

catamphetamine commented 5 years ago

This is how they do it in Clover:

https://github.com/Floens/Clover/blob/dev/Clover/app/src/main/java/org/floens/chan/core/site/sites/lainchan/Lainchan.java

        setBoards(
                Board.fromSiteNameCode(this, "Programming", "λ"),
                Board.fromSiteNameCode(this, "Do It Yourself", "Δ"),
                Board.fromSiteNameCode(this, "Security", "sec"),
                Board.fromSiteNameCode(this, "Technology", "Ω"),
                Board.fromSiteNameCode(this, "Games and Interactive Media", "inter"),
                Board.fromSiteNameCode(this, "Literature", "lit"),
                Board.fromSiteNameCode(this, "Musical and Audible Media", "music"),
                Board.fromSiteNameCode(this, "Visual Media", "vis"),
                Board.fromSiteNameCode(this, "Humanity", "hum"),
                Board.fromSiteNameCode(this, "Drugs 3.0", "drug"),
                Board.fromSiteNameCode(this, "Consciousness and Dreams", "zzz"),
                Board.fromSiteNameCode(this, "layer", "layer"),
                Board.fromSiteNameCode(this, "Questions and Complaints", "q"),
                Board.fromSiteNameCode(this, "Random", "r"),
                Board.fromSiteNameCode(this, "Lain", "lain")
        );

New boards won't be visible. Deleted/renamed boards won't work.

w3bb commented 4 years ago

I'm writing a script that fetches boards and recent posts on another instance of lainchan, this would be super useful.