成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

記錄下Flarum論壇API設(shè)計(jì)

YorkChen / 1555人閱讀

摘要:

Using the API

Every Flarum forum exposes a publicly-accessible JSON API that can read and write forum data. It conforms to the JSON-API 1.0 specification.

Authentication

The API uses token-based authentication. Some endpoints do not require authentication. You can retrieve a token from the /api/token endpoint:

POST /api/token HTTP/1.1

{
    "identification": "Toby",
    "password": "pass7word"
}

HTTP/1.1 200 OK

{
    "token": "YACub2KLfe8mfmHPcUKtt6t2SMJOGPXnZbqhc3nX",
    "userId": "1"
}

You can then pass the token in an Authorization header in subsequent requests:

GET /api/forum HTTP/1.1
Authorization: Token YACub2KLfe8mfmHPcUKtt6t2SMJOGPXnZbqhc3nX

Forum

GET /api/forum - get information about the forum, including groups and tags
PATCH /api/forum - update forum config

Discussions

GET /api/discussions - get all discussions (sort is -time by default)
filter[q] - filter by username/gambits
POST /api/discussions - create a new discussion
GET /api/discussions/:id - get a discussion by ID
PATCH /api/discussions/:id - update a discussion
DELETE /api/discussions/:id - delete a discussion

Posts

GET /api/posts - get all posts
filter[discussion] - filter by discussion ID
filter[user] - filter by user ID
filter[number] - filter by number (position within the discussion)
filter[type] - filter by post type
POST /api/posts - create a new post
GET /api/posts/:id - get a post by ID
PATCH /api/posts/:id - update a post
DELETE /api/posts/:id - delete a post

Users

GET /api/users - get all users
filter[q] - filter by username/gambits
POST /api/users - register a new user
GET /api/users/:idOrUsername - get a user by ID or username
PATCH /api/users/:id - update a user
DELETE /api/users/:id - delete a user
POST /api/users/:id/avatar - upload a user avatar
DELETE /api/users/:id/avatar - delete a user avatar

Groups

GET /api/groups - get all groups
POST /api/groups - create a new group
PATCH /api/groups/:id - update a group
DELETE /api/groups/:id - delete a group

Notifications

GET /api/notifications - get all notifications
PATCH /api/notifications/:id - mark a notification as read

Tags

POST /api/tags - create a new tag
PATCH /api/tags/:id - update a tag
DELETE /api/tags/:id - delete a tag

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/21519.html

相關(guān)文章

  • 利用Google云搭建Flarum論壇

    摘要:前言本教程面向新人撰寫,無(wú)需任何編程語(yǔ)言基礎(chǔ),教你如何搭建一個(gè)輕論壇。按照本教程的操作方法,您可以順利完成搭建并將論壇上線。禁用緩存,存在小的緩存,論壇內(nèi)的刷新頁(yè)面并不會(huì)刷新內(nèi)容,而是返回之前的某個(gè)時(shí)間段,其原因?yàn)榫彺鎲?wèn)題。 前言 本教程面向新人撰寫,無(wú)需任何編程語(yǔ)言基礎(chǔ),教你如何搭建一個(gè)輕論壇。您可以訪問(wèn) https://flarum.org.cn/ 來(lái)了解該更多相關(guān)信息。 按照本教...

    MSchumi 評(píng)論0 收藏0
  • 利用Google云搭建Flarum論壇

    摘要:前言本教程面向新人撰寫,無(wú)需任何編程語(yǔ)言基礎(chǔ),教你如何搭建一個(gè)輕論壇。按照本教程的操作方法,您可以順利完成搭建并將論壇上線。禁用緩存,存在小的緩存,論壇內(nèi)的刷新頁(yè)面并不會(huì)刷新內(nèi)容,而是返回之前的某個(gè)時(shí)間段,其原因?yàn)榫彺鎲?wèn)題。 前言 本教程面向新人撰寫,無(wú)需任何編程語(yǔ)言基礎(chǔ),教你如何搭建一個(gè)輕論壇。您可以訪問(wèn) https://flarum.org.cn/ 來(lái)了解該更多相關(guān)信息。 按照本教...

    Barrior 評(píng)論0 收藏0
  • 強(qiáng)強(qiáng)聯(lián)合:FluxBB 作者加盟 Flarum

    摘要:原文作者譯文強(qiáng)強(qiáng)聯(lián)合作者加盟譯者是一個(gè)快速輕量級(jí)論壇軟件,它的開發(fā)者是一名德國(guó)的天才。將加入我們,并成為的核心成員,并負(fù)責(zé)和相關(guān)的工作。的加盟將使我們能發(fā)揮我們的長(zhǎng)處,共同完成一個(gè)驚人的論壇軟件。 原文:FluxBB Joins Forces With Flarum 作者:Toby Zerner 譯文:強(qiáng)強(qiáng)聯(lián)合:FluxBB 作者加盟 Flarum 譯者:justjavac Flu...

    CoyPan 評(píng)論0 收藏0
  • Flarum 安裝

    摘要:附帶了一個(gè)的文件,此文件包含了需要用到的規(guī)則。然而,在這個(gè)階段還為時(shí)過(guò)早,我們需要先發(fā)布穩(wěn)定版文章來(lái)源中文開發(fā)者社區(qū) 系統(tǒng)需求 服務(wù)器: Apache (需要支持 mod_rewrite) 、Nginx PHP 5.5+ MySQL 5.5+ 在線安裝 下載安裝包,解壓,上傳文件到服務(wù)器 訪問(wèn)域名根目錄 填寫網(wǎng)址信息:如網(wǎng)站名稱、管理員信息、數(shù)據(jù)庫(kù)信息,點(diǎn)擊Install Fla...

    Betta 評(píng)論0 收藏0
  • 堡塔網(wǎng)站加速插件:為網(wǎng)站加速的插件「wordpress效果測(cè)評(píng)」

    摘要:堡塔網(wǎng)站加速是寶塔面板為用戶開發(fā)的一款網(wǎng)站加速插件網(wǎng)站加速插件,基于頁(yè)面緩存的網(wǎng)站加速插件,支持常見(jiàn)的眾多建站程序加速。那么有了堡塔網(wǎng)站加速之后,我們可以使用更多的加速方式,提升網(wǎng)站打開速度。實(shí)測(cè)加速性能遠(yuǎn)強(qiáng)于,以下加速效果來(lái)自環(huán)境。堡塔網(wǎng)站加速是寶塔面板為用戶開發(fā)的一款網(wǎng)站加速插件,基于頁(yè)面緩存的網(wǎng)站加速插件,支持常見(jiàn)的眾多建站程序加速。其原理是在http協(xié)議層緩存動(dòng)態(tài)頁(yè)面,對(duì)實(shí)時(shí)信息及已...

    番茄西紅柿 評(píng)論0 收藏2637

發(fā)表評(píng)論

0條評(píng)論

閱讀需要支付1元查看
<