Flutter Development Kit apifm-flutter 1.1.0 released

Flutter Development Kit apifm-flutter 1.1.0 release, updates are as follows:

JSON data set

Apifm.jsonSet(Map<String, String> params)

Parameter Description:

  1. type custom type, up to 32 characters
  2. refId associated data number (numeric)
  3. content Json data content (will pass)

If you want to edit a Json record, you will need to re-transmission of a parameter (id), on behalf of the record you want to modify ID

Read JSON data set list

Apifm.jsonList([Map<String, String> params])

It supports the following parameters:

  1. The first page is read several pages of data, which does not pass parameter defaults to 1;
  2. pageSize several page data read, do not pass the default parameters takes 50;
  3. This type of read only type Json record;
  4. Json refId simply reads all the data records;

Delete JSON data

Apifm.jsonDelete(int id[, String token])

Delete the specified id Json record

email registration

Apifm.registerEmail(Map<String, String> params)

QQ Internet one-click registration

 Apifm.registerQQConnect(Map<String, String> params)

QQ interconnection of a key registration function requires the following parameters:

QQ after the returns authorization parameters:

oauthConsumerKey、openid、accessToken

Consult the documentation specific interfaces interconnected QQ

Optional parameters:

Extended information referrer invite people, you invite registered user id postJsonString registered, Json data format

A micro-channel register key

 Apifm.registerWX(Map<String, String> params)

Micro letter of a key registration function requires the following parameters:

After the return of the authorization parameters:

code

Optional parameters:

Extended information referrer invite people, you invite registered user id postJsonString registered, Json data format

Email Login

Apifm.loginEmail(String email, String pwd, String deviceId, String deviceName)

Sample code:

var res = await Apifm.loginEmail('[email protected]', '123456', '33010500879931234', 'iphone8 Plus');
int uid = res['data']['uid'];
String token = res['data']['token'];
print('uid: $uid, token is : $token');

deviceId recommended to read the serial number of the phone;

deviceName recommended to read the phone model;

QQ Internet one-click login

 Apifm.loginQQConnect(String oauthConsumerKey, String openid, String accessToken)

3 login parameters, please consult QQ interconnect interface documentation return value

Micro-channel one-click login

 Apifm.loginWX(String code)

After the authorization code is successful return of scrip

Categories

 Apifm.goodsCategory()

Read data set in the background all categories, superior-subordinate relationship between the level of classification, use and manage pid

level = 1 denotes the stage 1 category; represents 2 Level 2 category, and so on

Representative of such higher category pid object ID (a category pid = 0)

Classification tree, based on the two fields can be used to achieve local js

Interface has returned an example:

{
  "code": 0,
  "data": [
    {
      "dateAdd": "2017-09-12 11:07:32",
      "dateUpdate": "2019-04-10 11:24:32",
      "icon": "https://cdn.it120.cc/apifactory/2019/04/09/f89753a227d26a3fe9ccc6f975857bb6.png",
      "id": 1872,
      "isUse": true,
      "key": "1",
      "level": 1,
      "name": "上装",
      "paixu": 0,
      "pid": 0,
      "type": "",
      "userId": 951
    }
  ],
  "msg": "success"
}

Get the Product List

 Apifm.goods([Map<String, String> params])

Read all product data, showing the form of paging, sorting support in various ways

Interface has returned an example:

{ 
  "Code": 0, 
  "the Data": [ 
    { 
      "categoryId": 1875, 
      "Characteristic": "Enjoy exclusive vip service, using Professional background, more powerful, better experience", 
      "Commission": 0, 
      "commissionType": 0, 
      "the DateAdd": "2019-03-19 09:51:08", 
      "the DateUpdate": "2019-08-14 09:49:34", 
      "gotScore": 0, 
      "gotScoreType": 0, 
      "ID": 124 305, 
      "kanjia": to true, 
      "kanjiaPrice": 49, 
      "Limitation": to false, 
      "logisticsId": 0, 
      "miaosha": to false, 
      "minprice ": 198, 
      " MinScore ": 0, 
      " name ":" API Plant 1 year vip members ",  
      " numberFav ": 0,
      " numberGoodReputation ": 1,
      "numberOrders": 1,
      "numberSells": 1,
      "originalPrice": 198,
      "paixu": 0,
      "pic": "https://cdn.it120.cc/apifactory/2019/03/19/6828c1ced4a74e11b532c8cbd864245a.png",
      "pingtuan": false,
      "pingtuanPrice": 0,
      "recommendStatus": 1,
      "recommendStatusStr": "推荐",
      "shopId": 0,
      "status": 0,
      "statusStr": "上架",
      "stores": 9999998,
      "userId": 951,
      "views": 15955,
      "weight": 0
    }
  ],
  "msg": "success"
}

Guess you like

Origin www.oschina.net/news/109897/apifm-flutter-1-1-0-released