All Projects → Qsnh → Cloudbookmark

Qsnh / Cloudbookmark

云书签

Projects that are alternatives of or similar to Cloudbookmark

Rest Api With Lumen
Rest API boilerplate for Lumen micro-framework.
Stars: ✭ 464 (+337.74%)
Mutual labels:  rest-api, laravel
Laravel Realworld Example App
Exemplary real world backend API built with Laravel
Stars: ✭ 954 (+800%)
Mutual labels:  rest-api, laravel
Laravel Orion
The simplest way to create REST API with Laravel
Stars: ✭ 481 (+353.77%)
Mutual labels:  rest-api, laravel
Lumen Generators
A collection of generators for Lumen and Laravel 5.
Stars: ✭ 339 (+219.81%)
Mutual labels:  rest-api, laravel
Laravel Api Starter
laravel5.5 + dingo/api + JWT
Stars: ✭ 85 (-19.81%)
Mutual labels:  rest-api, laravel
Larapi
An API-friendly fork of Laravel. Authentication, error handling, resource filtering, sorting, pagination and much more included
Stars: ✭ 397 (+274.53%)
Mutual labels:  rest-api, laravel
Binding Of Isaac Api
A RESTful API for the Binding of Isaac game series
Stars: ✭ 11 (-89.62%)
Mutual labels:  rest-api, laravel
Forrest
A Laravel library for Salesforce
Stars: ✭ 171 (+61.32%)
Mutual labels:  rest-api, laravel
Project
⭐️ Antares Project Application Skeleton. This is the very first place you should start. It allows you to create a brand new awesome project in easy few steps.
Stars: ✭ 84 (-20.75%)
Mutual labels:  rest-api, laravel
Laravel Restify
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.
Stars: ✭ 62 (-41.51%)
Mutual labels:  rest-api, laravel
Jikan Rest
The REST API for Jikan
Stars: ✭ 200 (+88.68%)
Mutual labels:  rest-api, laravel
Laravel Rest Api
Powerful RestAPI plugin for Laravel
Stars: ✭ 90 (-15.09%)
Mutual labels:  rest-api, laravel
Lumen Microservice
Lumen on Docker - Skeleton project with Nginx, MySQL & PHP 7 | Aws ECS, Google Kubernates, Azure Container Engine
Stars: ✭ 183 (+72.64%)
Mutual labels:  rest-api, laravel
Laravel Api Response Builder
Builds nice, normalized and easy to consume Laravel REST API JSON responses.
Stars: ✭ 433 (+308.49%)
Mutual labels:  rest-api, laravel
Vue Material Admin
A vue material design admin template
Stars: ✭ 2,170 (+1947.17%)
Mutual labels:  rest-api, laravel
Laravel Adminpanel
A Laravel Admin Panel (Laravel Version : 6.0)
Stars: ✭ 774 (+630.19%)
Mutual labels:  rest-api, laravel
Laravel Api Handler
Package providing helper functions for a Laravel REST-API
Stars: ✭ 150 (+41.51%)
Mutual labels:  rest-api, laravel
Restful Api With Laravel Definitive Guide
Repository with the base code for the course "RESTful API with Laravel - Definitive-Guide"
Stars: ✭ 156 (+47.17%)
Mutual labels:  rest-api, laravel
Laravel Compass
A REST client inside your Laravel app
Stars: ✭ 1,002 (+845.28%)
Mutual labels:  rest-api, laravel
Laravel Woocommerce
WooCommerce Rest API for Laravel
Stars: ✭ 86 (-18.87%)
Mutual labels:  rest-api, laravel

云书签 CloudBookMark

Laravel + VueJS

此项目只是整个应用的的API部分,SPA部分请查看:https://github.com/Qsnh/CloudBookMark-SPA

安装说明

一、下载到本地:

git clone https://github.com/Qsnh/CloudBookMark.git

二、安装依赖

composer install

三、配置 .env 文件

cp .env.example .env

四、生成 key

php artisan key:generate

五、安装数据表

php artisan migrate

六、安装 Laravel Passport 授权客户端

php artisan passport:install

七、配置前端App。

接口详细说明(针对V2)

除了获取 AccessToken 接口,其他的 API 访问均需要在 Request Header 中加入:

Authorization:Bearer access_token

注意 Bearer 后面有个空格

/oauth/token

参数 说明 默认值
grant_type 授权方式 password
client_id 客户端ID
client_secret 客户端secret
username 用户名
password 密码
scope 权限范围

/category

参数 说明 默认值
category_name 分类名

/category/{id}

参数 说明 默认值
category_name 分类名

/bookmark

参数 说明 默认值
category_id 分类ID
bookmark_name 书签名
bookmark_url 书签地址

用户接口

方法 接口 解释
POST /oauth/token 获取AccessToken
GET /user 获取用户信息
GET /user?include=categories 获取用户信息 + 分类
GET /user?include=categories.bookmarks 获取用户信息 + 分类 + 书签

V2

V2版本接口是在作者学习 RESTful API 设计的API接口,全局基本满足 RESTful API 的设计规范。同时也保留了V1版本。

分类接口

方法 接口 code(success) 解释
GET /categories 200 获取当前用户所有的分类
POST /category 201 创建分类
GET /category/{id} 200 获取ID的分类
PATCH /category/{id} 201 编辑分类
DELETE /category/{id} 204 删除分类

书签接口

方法 接口 code(success) 解释
GET /bookmarks 200 获取当前用户所有书签
DELETE /bookmark/{id} 204 删除书签
POST /bookmark 201 创建书签

留意彩蛋.

V1

V1版本在写这个项目的时候作者对于 RESTful API 了解不足,API的设计也有很多缺陷。

分类接口

方法 接口 解释
GET /api/v1/category 获取所有分类
GET /api/v1/category?include=bookmarks 获取分类 + 书签
POST /api/v1/category/add 添加分类
GET /api/v1/category/{id}/find 查找单个分类
DELETE /api/v1/category/{id}/delete 删除分类
POST /api/v1/category/{id}/edit 编辑分类

书签接口

方法 接口 解释
GET /api/v1/bookmark 获取书签
GET /api/v1/bookmark?include=category 获取书签 + 分类
POST /api/v1/bookmark/add 添加书签
DELETE /api/v1/bookmark/{id}/delete 删除书签

数据统一返回结构

{
    "code": 0 | 1,
    "error": success | error,
    "message": "说明信息",
    "data": object,
}

Over.

注意,所有的API均支持跨域操作,如要关闭,请进行如下操作:

第一、删除 config/app.php 中的 Barryvdh\Cors\ServiceProvider::class,

第二、删除 app/Http/kernel.php 中的 \Barryvdh\Cors\HandleCors::class,

===============================

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:

Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The Laravel documentation is thorough, complete, and makes it a breeze to get started learning the framework.

If you're not in the mood to read, Laracasts contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].