UMD-CSSA WeApp Server API

GitHub commit activity GitHub contributors GitHub issues GitHub code size in bytes GitHub license

Description

wxapp-server is a backend server that provides API for UMD CSSA Miniapp.

Last Modified on Nov. 8th, 2019.

Contents

Important Constants

Item Version
Host URL https://wxapp.umd-cssa.org/api/{API_VERSION}
API Ver. v0
Handbook Ver. v2018

API List

1. Freshman Handbook Image

Request

Method URL
GET /handbook/{HANDBOOK_VERSION}

Parameter(s):

Key Name Value Type Example Description
pg int [1, 142] 1 Page number.

Respond

Content-Type Content
image/png OR image/jpeg Raw image.

Example

<image src="https://wxapp.umd-cssa.org/api/v0/handbook/v2018?pg=1" />

2. MiniApp Login

Request

Method URL
GET /miniapp/login

Parameter(s):

Key Name Value Type Example Description
code String 0818RlAt1MmAef07eAat1PYoata18lAa Code return from wx.login().

Respond

Content-Type Content
application/json See Below

Content:

Key Name Key Type Value Type Example
_3rd_session String String //TODO

Example

wx.login({
  success(res) {
    if (res.code) {
      wx.request({
        url: "https://wxapp.umd-cssa.org/api/v0/miniapp/login",
        data: {
          code: res.code
        },
        success(res) {
          if (statusCode === 200) {
            // Store this sesssion for future use.
            console.log(res.data._3rd_session);
          }
        }
      });
    }
  }
});

Contributing

It is strongly encouraged to submit bug reports and feature requests through GitHub Issue page. It will help us organize and keep track of every issue reported.

Option 2: Contact us via Email

Please email to umdcssait@gmail.com, and make sure to includce Wechat MiniApp in subject.

Authors

License

This project is licensed under the GNU v3 License - see LICENSE.md for details.