hkgos / hkug Goto Github PK
View Code? Open in Web Editor NEW高登 + 連登 =聯登
License: MIT License
高登 + 連登 =聯登
License: MIT License
Cannot distinguish the origins of the post. Suggest that add some symbol or icon to the title.
seems cannot get data from HKG
Here is a example on common HTTP header after authentication:
Header | login user | used in browser | used in android | value | sample |
---|---|---|---|---|---|
x-li-device | x | ✓ | ✓ | sha1(UUID) | bd62c29291cbe9fb9662ef70f8c5042d55680f0 |
x-li-device-type | x | ✓ | ✓ | browser or android | browser |
x-li-digest | ✓ | ✓ | ✓ | sha1(jeams${{http method in lower case}}${{url}}$${{user token}}${{value from x-li-request-time}}) | 82f1f6d46e14f73b088fbac68984aae5f157c971 |
x-li-load-time | x | ✓ | x | ????? | 4.3450985 |
x-li-plus | ✓ | ✓ | ✓ | ????? | 473672897fbc4c2447aefa76e69f26191e6385c1 |
x-li-request-time | ✓ | ✓ | ✓ | unix time stamp in UTC | 1525597958 |
x-li-user | ✓ | ✓ | ✓ | user id |
The digest example was generated as following
name | value |
---|---|
{{http method in lower case}} | get |
{{url}} | https://lihkg.com/api_v2/thread/634747/page/1?order=reply_time |
{{user token}} | fc108e0701575efb4a70b69db2779860d02b9d33 |
{{value from x-li-request-time}} | 1525597958 |
sha1( jeams${{http method in lower case}}${{url}}$${{user token}}${{value from x-li-request-time}} )
---> sha1( jeams$get$https://lihkg.com/api_v2/thread/634747/page/1?order=reply_time$$fc108e0701575efb4a70b69db2779860d02b9d33$1525597958 )
---> 82f1f6d46e14f73b088fbac68984aae5f157c971
With common HTTP header above, we can access the API after user login
hkug/hkug-backend-node/src/domains/Topic.js
Lines 1 to 15 in 0eb12f2
authorId: 會唔會係冇用嘅資料? 大部份topic list都只係display個author名就夠
category: 如果係user轉台先攞topic list, category會唔會次次攞都一樣?
id: 係就咁一個integer, 定係一個hash(forum, url)
authorGender: hkg/lihkg 手機version都有出topic果時出埋author係巴定絲
url: 我提議記錄埋topic指向嘅url, 因為user click入去果時應該會用到個url
hkg - https://m.hkgolden.com/view.aspx?message=6887195&type=YY (YY係category, 係optional)
lihkg - https://lihkg.com/thread/XXXXXX/page/1
應該只係記低XXXXXX果part就夠
To handle either HKG or LIHKG server fown, it should prompt server down message and display remaining post of other forum(s).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.