API文档

在python开荒进度中,日常会动用第三方包,也许放置的包。

Dash是二个API文书档案浏览器( API Documentation
Browser卡塔 尔(英语:State of Qatar),以至代码片段管理工科具(Code Snippet Manager卡塔 尔(英语:State of Qatar)。
它的文书档案库采纳了docset格式,高档客户依照网址提供的课程,超轻松就会自行增添别的的恢宏文书档案,其实Dash在初期揭橥的时候,只帮衬少之甚少的多少个文档浏览,好像独有Java、HTML、CSS这几个,是新兴透过顾客不断进献,以至小编及时的申报(Rails
API正是本身通过Email与小编联系,诉求加多的,作者非常nice卡塔 尔(英语:State of Qatar),稳步扩充,才拥有了如此宽广的言语、框架协理。要增多API文书档案,展开软件配置分界面,切换成Docset选项卡就能够见到有着内置的文书档案列表,按须求活动下载就可以(假如是投机创造的docset,双击就能够导入Dash卡塔尔国

Crazylark’s

那么那么些包,具体有怎么着选项,有怎么着方法,你知道吧?下边介绍风姿罗曼蒂克种万能形式。


Api Document

README ===if u wander more click
here

 

https://kapeli.com/dash(官网)

Mobile number Authentication(Sign up)

利用命令:<注意,命令里python展现的API版本是基于那个来的,借使要查看分歧版本的,请在此分别>

Description

When user input his mobile number. Browser send a json make sure that
this mobile has not been signed.

python -m pydoc -p 8000

Http request

POST http://localhost:port/users.json

您会看出如此的分界面:

Query Parameter

[
{
"mobile_number": 15908155675
}
]     

图片 1

Message Authentication(Sign up)

 

Description

Server has send a massage to current user’s mobile phone including a
6-bit authentic number. And user need to input this number correctly.

接下去访问上述那些地点:

Http request

POST http://localhost:port/users.json

图片 2

Query Parameter

[
{
"mobile_number": 15908155675,
"message": 123456
}
]       

 

CD-key Authentication(Sign up)

能够看见,全数的安装包,API音信都显得在这里个分界面,大家找一个试跳,selenium吧

Description

Make sure user has payed.

图片 3

Http request

POST http://localhost:port/users.json

图片 4

Query Parameter

[
{
"mobile_number": 15908155675,
"message": 123456,
"key": "FT73QBYUEWQ7"
}
]   

 

Sign up Authentication(Sign up)

 

Description

User has finished all input box correctly. And click the submit
bottom.

Http request

POST http://localhost:port/users.json

Query Parameter

[
{
"mobile_number": 15908155675,
"message": 123456,
"key": "FT73QBYUEWQ7",
"password": "123789",
"passworde_comfirmation": "123789"
}
]   

Mobile number Authenticatiion(Log in)

Description

User wanna log in and input his mobile number.

Http request

POST http://localhost:port/sessions.json

Query Parameter

[
{
"mobile_number": 15908155675
}
]   

Log in Authentication(Log in)

Description

Server need to affirm if mobile number and password are corresponding.

Http request

POST http://localhost:port/sessions.json

Query Parameter

[
{
"mobile_number": 15908155675,
"password": "123789"
}
]   

Get all the staff(Staff Management)

Description

User ask for a list of all the staff.

Http request

GET http://localhost:port/employees.json

Query Parameter

[
"corporation_id": 1,
"department":
[
{
"name":"开发部",
"member_count": 6
},
{
"name": "流程部",
"member_count": 16
}
],
"employees":
[
{
"id": 1,
"mobile_number": 12345678910,
"name": "唐宇",
"mac": "98:E0:D9:4E:71:A4",
"openid": "oB4nYjvY13SVtaWC-AFztM2f3TlU",
"corporation_id": 1,
"department": "开发部",
"image": "tangyu.jpg"
},
{
"id": 2,
"mobile_number": 78912345610,
"name": "李嘉迅",
"mac": "48:E9:K9:A9:71:A8",
"openid": "oB4nYjvY13SVtaWC-AFztM2f3TlU",
"corporation_id": 1,
"department": "流程部",
"image": "lijiaxun.jpg"
}
]
]

Get the special staff(Staff Management)

Description

User ask for the special staff infomation.

Http request

GET http://localhost:port/employees/id.json

Query Parameter

[
{
"id": 1,
"mobile_number": 12345678910,
"name": "唐宇",
"mac": "98:E0:D9:4E:71:A4",
"openid": "oB4nYjvY13SVtaWC-AFztM2f3TlU",
"corporation_id": 1,
"department": "开发部",
"image": "tangyu.jpg"
"clock_info":
[
{
"date": "/Date(700000+0500)/",
"clock": "normal", 
"holiday?": false,
"id": 1
},  
{
"date": "/Date(710000+0500)/",
"clock": "late", 
"holiday?": false,
"id": 1
},
.
.
.
{
"date": "/Date(770000+0500)/",
"clock": "absence", 
"holiday?": false,
"id": 1
}
]
]

Change staff profile(Staff Management)

Description

User edit profile of the staff

Http request

PATCH http://localhost:port/employees/id.json

Query request

[
{
"id": 1,
"mobile_number": 12345678910,
"name": "唐宇",
"mac": "98:E0:D9:4E:71:A4",
"department": "开发部",
"image": "tangyu.jpg"
"clock_info":
[
{
"date": "/Date(700000+0500)/",
"clock": "normal", 
"holiday?": false,
"id": 1
},  
{
"date": "/Date(710000+0500)/",
"clock": "late", 
"holiday?": false,
"id": 1
},
.
.
.
{
"date": "/Date(770000+0500)/",
"clock": "absence", 
"holiday?": false,
"id": 1
}
]
]

Delete someone leave our firm(Staff Management)

Description

User need to delete all information of someone who leave this company.

Http request

DELETE http://localhost:port/employees/id.json

Query Parameter

[
{
"id":1 
}
]

User profile fill form(User Setting)

Description

After user’s login action, he will fill his profile form and then
server could know more datail infomation about him.

Http request

POST http://localhost:port/users/id.json

Query Parameter

[
{
"mobile_number": 168-0312-8888,
"password": "123789",
"passworde_reset": "789123",
"email": "foxmother@gmail.com",
"name": "董小姐",
"gender": "female"
}
]   

User fill firm infomation(User Setting)

Description

User who takes charge of personnel need to input some message about
this company, including departments and leaders.

Http request

GET http://localhost:port/corporations/id.json

Query Parameter

[
{
"corporation_name": "聊聊科技",
"address": "天上",
"department": 
[
{
"department_name": "开发部"
},
{
"department_name": "流程部"
}
]
}
]

User set clock time(Clock Setting)

Description

User input T1 to T6. Ps:therer should be some default values, user
could change them if necessary.

Http request

PATCH http://localhost:port/time_clocks.json

Query Parameter

[
{
"t1": "8:00",
"t2": "9:00",
"t3": "10:00",
"t4": "4:00",
"t5": "5:00",
"t6": "6:00" 
}
]

User set clock mode(Clock Setting)

Description

User choose a clock mode in 3. Ps:therer should be a default value,
user could change them if necessary.

Http request

PATCH http://localhost:port/clockmodes.json

Query Parameter

[
{
"mode": "hell"
}
]

Month Staement(Statements)

Description

All employees with their clock records.

Http request

PATCH http://localhost:port/statements/1.json("1" means Jan)

Query Parameter

[
{
"id":1,
"name": "唐宇",
"corporation_id": 1,
"department": "开发部",
"overtime": 14,
"clock_info":
[
{
"date": "/Date(700000+0500)/",
"clock": "normal", 
"holiday?": false,
"id": 1
},  
{
"date": "/Date(710000+0500)/",
"clock": "late", 
"holiday?": false,
"id": 1
},
.
.
.
{
"date": "/Date(770000+0500)/",
"clock": "absence", 
"holiday?": false,
"id": 1
}
]
},
{
"id":2,
"name": "李嘉迅",
"corporation_id": 1,
"department": "流程部",
"overtime": 23,
"clock_info":
[
{
"date": "/Date(700000+0500)/",
"clock": "normal", 
"holiday?": false,
"id": 2
},  
{
"date": "/Date(710000+0500)/",
"clock": "late", 
"holiday?": false,
"id": 2
},
.
.
.
{
"date": "/Date(770000+0500)/",
"clock": "absence", 
"holiday?": false,
"id": 2
}
]
}
]

Main page(Dash board)

Description

Main page dashboard.

Http request

GET http://localhost:port/dashboard.json

Query Parameter

[
{
"late_count": 1,
"absencec_count": 1,
"attendance": 1,
"tardy": 1,
"vacate" 1,
"total": 5,
"departemnts":[
{
"name": "开发部"
},
{
"name": "流程部",
}
]
}
]

发表评论

电子邮件地址不会被公开。 必填项已用*标注