maoruibin / maoruibin/maoruibin.github.com

柳叶清单开放 API

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blog
Dominant language
HTML
Stars
22
Forks
4
PR merge metrics
No merged PRs in 30d

Description

介绍

柳叶清单是自己开发的一个清单 Web 应用,目前网页版已经上线运行,地址如下:

http://gudong.name/list

为了方便其他开发者使用清单服务,现在开放了部分 API,以便大家可以使用这些 API 去开发自己的 todo 应用,而不需要去建立自己的后台。

这里先简单说一下具体的数据 model 关系,目前一共有 4 个 model,分别是 User、Project、Group、Todo.

  • User: 用户信息
  • Project:清单项目,一个用户(User)可以创建多个清单项目。
  • Group:分组,一个清单项目(Project)包含多个清单分组
  • Todo:事项,每个分组(Group)下有若干 Todo 组成

这个关系用图表示出来如下所示:

上面的示意有点抽象,这里用一个具体的例子进行展示如下:

下面是目前开放出来的所有数据操作相关的 API,包括用户登录、注册,以及事项(Todo)、分组(Group)、项目(Project)数据的操作,如下所示:

用户信息


登录

https://waishuo.leanapp.cn/users/api/v1.0/login

请求方式:POST

请求参数:

响应结果:

注册

https://waishuo.leanapp.cn/users/api/v1.0/users

请求方式:POST

请求参数:

响应结果:

获取用户信息

https://waishuo.leanapp.cn/api/v1.0/users/

请求方式:GET

说明:url 请求参数中最后需要指定 user id

请求参数:

响应结果:

Todo


创建 todo

https://waishuo.leanapp.cn/api/v1.0/todos

请求方式:POST

请求参数:

响应结果:

更新 Todo

https://waishuo.leanapp.cn/api/v1.0/todos/\<todoId>

请求方式:PUT

说明:url 请求参数中最后需要指定 todo id

请求参数:

响应结果:

删除 Todo

https://waishuo.leanapp.cn/api/v1.0/todos/\<todoId>

请求方式:DEL

请求参数:

说明:url 请求参数中最后需要指定 todo id

响应结果:

获取 Todo

https://waishuo.leanapp.cn/api/v1.0/todos/\<todoId>

请求方式:GET

请求参数:

说明:url 请求参数中最后需要指定 todo id

响应结果:

分组 API


创建分组

https://waishuo.leanapp.cn/api/v1.0/todos/groups

请求方式:POST

请求参数:

响应结果:

更新分组

https://waishuo.leanapp.cn/api/v1.0/todos/groups/\<groupId>

请求方式:PUT

说明:url 请求参数中最后需要指定 groupId

请求参数:

响应结果:

获取项目分组列表

https://waishuo.leanapp.cn/api/v1.0/todos/groups/projects/

请求方式:GET

请求参数:

说明:url 请求参数中最后需要指定 projectId

响应结果:

删除分组

https://waishuo.leanapp.cn/api/v1.0/todos/groups/\<groupId>

请求方式:DEL

请求参数:

说明:url 请求参数中最后需要指定 groupId

响应结果:

Project 相关 api


创建项目

https://waishuo.leanapp.cn/api/v1.0/project

请求方式:POST

请求参数:

响应结果:

编辑项目

https://waishuo.leanapp.cn/api/v1.0/project

请求方式:PUT

请求参数:

响应结果:

删除项目

https://waishuo.leanapp.cn/api/v1.0/projects/\<projectId>
注意:删除时,会把项目下的分组以及 todo 全部删除

请求方式:DEL

说明:url 请求参数中最后需要指定 projectId

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue body contains API descriptions for users, todos, groups, and projects, but it does not name a repository file, entry point, or requested change. First confirm whether this is intended as a blog post, API implementation, or documentation update. Done should be defined by the maintainer before work starts.

Written by the indexing model from the issue text.

Assessment

Domain
content, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.