0.1.1 • Published 8 years ago

moefou v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Moefou 萌否 API wrapper

This is a node module that allows you to interact with 萌否API.

Install

npm install moefou

Example

const Moefou = require('moefou')
const m = new Moefou('your_api_key')

// 获取一个用户的基础资料
// http://open.moefou.org/docs/api/user/detail
m.userDetail({ uid: 2127 }, (error, response, body) => {
  if (error) throw error

  console.log(body.response.user)
})

Notice that some methods require a parameter called optionals, which is a JavaScript Object contains optional parameters. You can pass in {} if you do not want specify any optional parameter.

Testing

Fill in apiKey in config-sample.json, rename the file to config.json.

Run tests: mocha

Endpoints

  • api.moefou.org

    • wiki/条目

      • wikis
      • on-air
      • wiki/detail
      • wiki/subs
      • wiki/favs
      • wiki/ratings
      • wiki/relationships
      • wiki/similarity
    • sub/子条目

      • sub/detail
      • sub/favs
      • sub/ratings
      • sub/relationships
    • user/用户

      • user/detail
      • user/favs/wiki
      • user/favs/sub
    • search/搜索

      • search/wiki
      • search/sub
    • fav/收藏

      • fav/add
      • fav/delete
  • moe.fm

    • play/播放接口

      • listen/playlist?api=json
      • ajax/log?log_obj_type=sub&log_type=listen&obj_type=song&api=format
    • web/网页接口

      • explore?api=format
      • music/{wiki_id}?api=format
      • music/{wiki_id}/songs?api=format
      • music/{wiki_id}/favs?api=format
    • other/其他接口

      • search/direct
0.1.1

8 years ago

0.1.0

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago