apifm 1.4.0

  • Readme
  • Changelog
  • Installing
  • 71

功能介绍 #

apifm 为你提供了 Flutter 的云开发支持,无需服务器,无需开发接口和后台,开箱即用,轻松开发 Flutter

只要你会 Flutter 开发就够了!免费注册开发者后台账号,勾选你需要的模块(CMS、CRM、商城等等),在后台发布并管理你的数据,通过 apifm 扩展直接调用即可

希望你能爱上TA

QQ交流群: 577126347

平台支持 #

使用方法 #

pubspec.yaml 文件增加依赖 #

dependencies:
  apifm: ^0.0.5

安装依赖 #

$ flutter pub get

引入 package #

import 'package:apifm/apifm.dart' as Apifm;

初始化 #

Apifm.init("gooking");

gooking 为你的开发者后台的专属域名,登录你的开发者后台,在后台首页即可查看属于你的专属域名「默认情况下为32个字母长度的字符串」

>> 前往免费注册开通开发者后台

调用api接口 #

这里以查询手机号码归属地(queryMobileLocation)的调用后台接口为例子说明如何在 Flutter 中使用 apifm ,其他接口,你可以根据使用文档的说明调用相应的方法即可

await 方式调用「推荐」: #

var res = await Apifm.queryMobileLocation("13500000000");
print(res);

Future 异步方法: #

Apifm.queryMobileLocation("13500000000").then((res) {
  print(res);
});

返回值说明 #

返回数据 (res) 主要包含 3 个内容:

  1. code 错误码,0 代表操作重构,其他数字均表示错误,具体错误描述请查看 msg;
  2. msg 如果上面的code不为0,那么 msg 将会返回具体的错误说明描述
  3. data 字段保存了 code 为0 时候的数据,一起你需要的数据,都保存在 data 中返回给你

相关资源 #

「5分钟上手教程」 「Demo程序」 「功能说明文档」 「api接口文档」

授权协议 #

MIT License

1.4.0 #

2019-09-22

全接口版本

1.3.0 #

2019-09-18

新增 #

  • 读取商品详情、会员限购、运费及会员折扣
  • 商品收藏管理

1.2.0 #

2019-09-16

新增 #

  • 读取用户资产(余额、积分)
  • 商品砍价相关功能

1.1.0 #

2019-09-13

新增 #

  • 微信一键注册、一键登录

1.0.0 #

2019-09-12

新增 #

  • QQ互联一键注册、一键登录
  • 用户绑定QQ,实现快速登录

优化 #

  • 邮箱注册增加邮件验证码校验
  • 方法名称优化,下划线命名方式改为驼峰命名

0.0.6 #

2019-09-09

新增 #

  • 读取商品分类
  • 读取商品列表
  • Json数据添加、修改、删除等管理

0.0.5 #

2019-09-09

新增 #

  • 查看用户积分明细
  • 积分券兑换积分
  • 根据后台设置的连续签到赠送规则,签到可获得积分

0.0.4 #

2019-09-06

新增 #

  • 启动图/轮播图 Apifm.banners()

0.0.3 #

2019-09-06

新增 #

  • 短信验证码获取 / 校验

0.0.2 #

2019-09-05

新增 #

  • 系统参数
  • 积分赠送规则(注册、消费、充值等赠送积分)
  • 每日签到送积分规则
  • 用户注册 / 登录(用户名、手机号)
  • 图形验证码校验

优化 #

  • request 方法可选参数支持

0.0.1 #

2019-09-05

新增 #

  • 增加后台 api 接口的 get/post 调用方法 request
  • 增加手机号码归属地查询方法 queryMobileLocation(mobile)

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  apifm: ^1.4.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:apifm/apifm.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
59
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
58
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

190 out of 190 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/apifm.dart. (-1 points)

Analysis of lib/apifm.dart reported 2 hints:

line 7 col 5: Name non-constant identifiers using lowerCamelCase.

line 8 col 5: Name non-constant identifiers using lowerCamelCase.

Maintenance issues and suggestions

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

The package description is too short. (-12 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and apifm.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
convert ^2.1.1 2.1.1
flutter 0.0.0
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test