https://github.com/u3u/qzone-api
⭐️ Node.js Qzone API service
https://github.com/u3u/qzone-api
qzone qzone-api
Last synced: 9 months ago
JSON representation
⭐️ Node.js Qzone API service
- Host: GitHub
- URL: https://github.com/u3u/qzone-api
- Owner: u3u
- License: mit
- Created: 2018-01-08T07:20:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-17T02:38:21.000Z (about 8 years ago)
- Last Synced: 2025-10-07T06:05:08.644Z (10 months ago)
- Topics: qzone, qzone-api
- Language: JavaScript
- Size: 837 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Qzone API
[](https://npmjs.com/package/qzone-api) [](https://npmjs.com/package/qzone-api) [](https://circleci.com/gh/u3u/qzone-api/tree/master) [](https://codecov.io/gh/u3u/qzone-api) [](https://github.com/prettier/prettier) [](https://github.com/sindresorhus/xo)
## Install
```bash
yarn add qzone-api
```
## Usage
```js
const QzoneApi = require('qzone-api')
;(async () => {
const { user, cookies } = await QzoneApi.login(
'your account',
'your password'
)
// Get user information
console.log(user) // { login: true, owner: true, token: 'xxx' }
const p_uin = cookies.find(x => x.name === 'p_uin').value
const p_skey = cookies.find(x => x.name === 'p_skey').value
// Get all albums for this user
const { vFeeds } = await QzoneApi.getAlbumList({
p_uin,
p_skey,
g_tk: token,
res_uin: '1542262366'
})
// Get the first 200 photos in 1542262366's first album
const { photos, total_count } = await QzoneApi.getPhotoList({
p_uin,
p_skey,
g_tk: token,
uin: '1542262366',
albumid: vFeeds[0].pic.albumid
})
// Get the total number of photos
console.log(total_count)
// Get all the picture address
console.log(
[].concat(...Object.values(photos).map(x => x.map(x => x[1].url)))
)
})()
```
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Author
**Qzone API** © [u3u](https://github.com/u3u), Released under the [MIT](./LICENSE) License.
Authored and maintained by u3u with help from contributors ([list](https://github.com/u3u/qzone-api/contributors)).
> [qwq.cat](https://qwq.cat) · GitHub [@u3u](https://github.com/u3u)