Giter Site home page Giter Site logo

weevelyu / weevely-api Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 414 KB

Open-source RESTful API built with Laravel framework for my own project "Weevely"

License: GNU General Public License v3.0

PHP 94.43% Blade 5.52% Procfile 0.05%
api api-rest laravel laravel-framework laravel8 php php8 weevely event calendar

weevely-api's Introduction

๐Ÿ“ฅ Downloads

โš“ Requirements

  • PHP 8.0.7
  • MySQL 6.x / MariaDB 10.x
  • Composer 2.x

macOS installation:
You can easily install those via Homebrew:

brew install php mysql composer

Windows installation:

  1. Download and install latest version of XAMPP. It will install you both PHP and MariaDB. Whenever you want to use your database, open XAMPP and start MySQL process. To access PhpMyAdmin, start both Apache and MySQL processes, click Admin button next to MySQL
  2. Download and install latest version of Composer. A PHP dependency manager.

๐Ÿงฐ Run API Locally

You can easily host this API on your server if you want to. But if you only want to work with data that is used by official Weevely, you can skip this step.

To host the API just follow these steps:

  1. Check the requirements โ˜๏ธ
  2. Download the latest version
  3. Open folder in your terminal and run composer install
  4. Create your database
  5. Create .env file and fill it with your data accordingly to .env.example file
  6. Run php artisan migrate to fill database with required tables
  7. If you want to add some data to database for testing, run php artisan db:seed
  8. Start the API server with php artisan serve

๐Ÿ”‘ API Reference

Authorization module

Action Request Method Requirements
Register /api/auth/register POST Data
Sign in /api/auth/signin POST Data
Sign out /api/auth/signout POST Bearer token
Reset password /api/auth/reset-password POST Data
Change password /api/auth/reset-password/{token} POST Data, token
Remove request /api/auth/reset-password/{token}/remove GET Token
Refresh token /api/auth/refresh GET Bearer token
Get user /api/auth/me GET Bearer token

User module

Action Request Method Requirements
Update data /api/users/me PATCH Bearer token, data
Upload avatar /api/users/me/avatar POST Bearer token, data

Calendars and events module

Actionn Request Method Requirements
Get my calendars /api/calendars/my/{type} GET Bearer token, type
Create calendar /api/calendars/my POST Bearer token, data (optional)
Get calendar /api/calendars/{calendar_id} GET Bearer token, calendar_id
Update calendar /api/calendars/{calendar_id} PATCH Bearer token, calendar_id, data
Delete calendar /api/calendars/{calendar_id} DELETE Bearer token, calendar_id
Share calendar /api/calendars/{calendar_id}/share POST Bearer token, calendar_id, users (json string)
Hide calendar /api/calendars/{calendar_id}/hide POST Bearer token, calendar_id
Get events /api/calendars/{calendar_id}/events GET Bearer token, calendar_id
Create event /api/calendars/{calendar_id}/events POST Bearer token, calendar_id, data (optional)
Update event /api/calendars/{calendar_id}/events/{event_id} PATCH Bearer token, calendar_id, data
Delete event /api/calendars/{calendar_id}/events/{event_id} DELETE Bearer token, calendar_id
Add holidays /api/calendars/{calendar_id}/holidays POST Bearer token, calendar_id, data (country, year)

๐ŸฆŠ Have a great day!

Don't forget to check out Weevely with Next.js
Also check out my other projects and visit my website!

weevely-api's People

Contributors

dependabot[bot] avatar paxanddos avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

senopro

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.