2. Agenda
- Introduction to our developer documentations
- Our current SDKs
- Cosmos
- LikeCoin button
- LIKE pay
- API
- Documentation and Postman
- Public API
- Authenticated API
3. Documentations
- User guide and developer resources
- https://docs.like.co/developer
- Our github
- https://github.com/likecoin/likecoin
- (Work in progress) g0v project hub
- https://chunyenhuang.github.io/awesome-g0v-projects/
#/project/LikeCoin%20%E8%AE%9A%E8%B3%9E%E
5%85%AC%E6%B0%91%E5%85%B1%E5%92%8C
%E5%9C%8B/dashboard
4. SDKs - Cosmo SDK/API
- LikeCoin chain is built on top of cosmos sdk
- Compatible to most cosmos sdk tools and documentations
- E.g. Tendermint / cosmos LCD restful API:
https://cosmos.network/rpc/v0.37.9
- Wallet / other cosmos tools might also work, if chain
parameters are set accordingly e.g. bigdipper
- @Chung will talk about it more in next week
5. LikeCoin button
- An website embedded in iframe, example
- Current two ways to integrate: iframe and js
- More sdk will be developed in the future: php, vue, react,
etc
6. LikeCoin button - iframe
- Most basic way to integrate LikeCoin button
- Iframe + Liker ID + referrer
(encodeURIComponent(${canonical URL}))
- Demo
- Reference
7. LikeCoin button - Javascript
- Simplest way to integrate LikeCoin button via a single
<script> include in html
- Demo
- Reference
8. LikeCoin button - Misc
We also support:
- Wordpress, 9.2k download, 1k+ active installations
- Embedly, supported on medium, etc
- https://button.like.co/{{LikerID}}
9. LikeCoin button - Usage
- Personal blog/site
- Medium article demo
- https://flagselling.net (WIP)
- ??? (your call)
10. LikePay
- Experimental sdks, still under development
- Currently support QR code and web widget, latter is not
released yet
11. LikePay - QR code
- Experimental SDK
- Useful if your site wants to accept payment from
LikerLand App
- Demo
- Reference
12. LikePay - Web widget
- Experimental, still under development
- Not available for production yet
- Allow websites to receive LIKE payment via redirecting to
like.co payment widget
- Example 1, Example 2
- Reference
13. API
- https://api.docs.like.co/
- We use Postman for development and documentation
purpose
- There are public APIs that does not require authentication,
and auth-ed API that uses OAuth 2.0 and JWT auth
14. Public API
- LikeCoin info and statistic, public user profiles, transaction
records, Cosmos LCD, and public LikeCoin button / article
info are accessible via api.like.co
- Many of our current products / SDKs are also built on top
of these
15. Public API - Demo: badges
- We have these little badges for showing LikeCoin
ecosystem real-time statistic
- We will use stat api and display the data with gh-badges
library
- How is it done
16. OAuth API
- We use a OAuth2.0-like auth flow
- We don't have a developer console yet, client id and
secret are generated on request, contact us if you need it
- Sensitive scope like `email`, `like:read` `like:write` are not
granted by default, please contact us if you feel that you
have a very suitable use case for them.
17. OAuth API - Demo
- We will use passport and @matters/passport-likecoin for
our auth flow
- This is a minimal example so we won’t handle the refresh
token part
- Demo
18. Conclusion
- Many of these APIs and SDKs are still under
development, or are in still experimental state
- Comments, suggestions and contributes are welcome!
- https://github.com/likecoin
- Also #likecoin channel in g0v-tw slack