Giter Site home page Giter Site logo

autojs-bmob-sdk's Introduction

autojs-bmob-sdk

SDK介绍

本SDK通过bmob restful API支持autojs数据库读写操作。

安装使用

**在Autojs中使用

复制代码到main.js或下载autojs-bmob-sdk.js

然后在项目中引入

var Bmob = require('../autojs-bmob-sdk.js');

Demo 示例代码

log(bmob.timestamp()); //时间戳
log(bmob.userCreate("test1","123456")); //添加用户
log(bmob.userLogin("test1","123456")); //用户登录
log(bmob.requestSmsCode("13939999999")); //获取手机验证码
log(bmob.userMobileCreate("13939999999","000000")); //注册手机用户
log(bmob.userMobileLogin("13939999999","000000")); //手机用户登录
log(bmob.userQuery("test1")); //查询用户
log(bmob.userCurrent('c470e3740d')); //当前用户 objectId
log(bmob.userUpdate("c470e3740d",'43c59ec540879cee8051110483f9dfb8',{"mobilePhoneNumber":"13939999999"}));
log(bmob.userSession("c470e3740d")); //用户seesion token
log(bmob.userDelete("c470e3740d",'43c59ec540879cee8051110483f9dfb8'));//删除用户
log(bmob.userList()); //用户列表
log(bmob.userPasswordReset("email",{"email":"[email protected]"})); //密码重置邮箱方式
log(bmob.userPasswordReset("sms",{"password":"123456"},smsCode)); //密码重置短信方式
log(bmob.userPasswordReset("oldNew",{"oldPassword": "654321","newPassword": "123456"},'f8b98e11ac','132efc77400780b380f33e94651652d7')); //更改密码
log(bmob.userEmailVerify("[email protected]"));

log(bmob.createObject("ClassName",{"category":"category","value":"value"})); //添加数据
log(bmob.createObjects("ClassName", [{"category": "category","value": "value1"},{"category": "category","value": "value2"}])); //批量添加数据
log(bmob.getObjects("ClassName")); //查询表数据
log(bmob.getObject("ClassName",'cd7bc2eefa')); //查询指定objectId数据
log(bmob.queryObject("ClassName",{"category": "category","value": "value1"})); 条件查询数据
log(bmob.updateObject("ClassName",'cd7bc2eefa',{"category": 'category2',"value": 'value11'})) 更新数据
log(bmob.deleteObject("ClassName",'cd7bc2eefa')); //删除指定objectId数据
log(bmob.BQL("select * from ClassName limit 0,100 order by category")) //BQL查询

相关知识点

  1. autojs https://github.com/hyb1996/Auto.js
  2. Bmob http://doc.bmob.cn/data/restful/index.html

感谢


  1. autojs作者 大屌萌妹
  2. 家 QQ:203118908

在此欢迎大家贡献代码

autojs-bmob-sdk's People

Contributors

hnauto avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

autojs-bmob-sdk's Issues

你好,能更新下这个代码吗?

你好,能更新下这个autojs-bmob-sdk的代码吗?
因为bmob.cn这个域名封了,加上现在国家监管要求国内要有自己的域名,现在Bmob后端云的SDK都会有一个 resetDomain方法(http://doc.bmobapp.com/data/android/develop_doc/#_69),变更为开发者自己的域名/8的模式。
另外,默认请求域名地址可以用Bmob海外版(国内备案完成前的开发用途)的域名地址:http://open.faasapi.net/8/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.