Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discourse API 整理 #1

Open
tiye opened this issue Aug 24, 2015 · 17 comments
Open

Discourse API 整理 #1

tiye opened this issue Aug 24, 2015 · 17 comments

Comments

@tiye
Copy link
Member

tiye commented Aug 24, 2015

No description provided.

@tiye
Copy link
Member Author

tiye commented Aug 24, 2015

当前已经明确的文档:
https://meta.discourse.org/t/discourse-api-documentation/22706
http://bbs.react-china.org/categories.json

另外前端调用 CORS 请求似乎需要在论坛服务器上开启, 我这两天看下

@pinyin
Copy link

pinyin commented Aug 25, 2015

@tiye
Copy link
Member Author

tiye commented Aug 27, 2015

我先加了粗粒度的 CORS 请求的支持, 现在应该能支持从其他网页请求数据:

add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, PUT, POST, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With";

@luqin
Copy link
Member

luqin commented Aug 27, 2015

前端是否实现成 API 客户端?

@tiye
Copy link
Member Author

tiye commented Aug 27, 2015

最初的想法是这样的. 按照思路后面还应该找登录的 API, 不过还没弄明白怎么搞...

@tiye
Copy link
Member Author

tiye commented Aug 31, 2015

@szhclaye
Copy link

还没开始写呢?

@geminiyellow geminiyellow mentioned this issue Oct 16, 2015
@geminiyellow
Copy link
Contributor

这个 apis 就是渣渣。

@luqin
Copy link
Member

luqin commented Oct 16, 2015

@geminiyellow 哈哈

@geminiyellow
Copy link
Contributor

@luqin 如果写 sdk 包的话,再配 redux 中间件,想不到有什么好办法来区分每个不同的请求。
很不好弄,直接写 actions 的话我觉得又好散。

@pinyin
Copy link

pinyin commented Oct 17, 2015

不考虑一下引入RxJS吗?Redux写法局限性还是挺大的

@geminiyellow
Copy link
Contributor

@pinyin 你推个 PR 呗。合适就合进去。反正现在都是实验田。

@luqin
Copy link
Member

luqin commented Oct 17, 2015

sdk指的是api独立模块?

@luqin
Copy link
Member

luqin commented Oct 17, 2015

api要考虑react-native复用

@geminiyellow
Copy link
Contributor

@luqin https://github.com/dhyasama/discourse-api 这个是可以的啊。

@luqin
Copy link
Member

luqin commented Oct 17, 2015

@geminiyellow 这是node端的,可以用

@geminiyellow
Copy link
Contributor

@luqin 我知道可以用,只是觉得很麻烦而已。并且粗看起来似乎不完整。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants