https://github.com/yasin4261/scooter-web-api
Rent scooter web api with golang fiber.
https://github.com/yasin4261/scooter-web-api
backend fiber go golang mongodb webapi
Last synced: 3 months ago
JSON representation
Rent scooter web api with golang fiber.
- Host: GitHub
- URL: https://github.com/yasin4261/scooter-web-api
- Owner: Yasin4261
- License: mit
- Created: 2024-08-21T03:11:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-13T21:54:22.000Z (almost 2 years ago)
- Last Synced: 2025-02-26T09:14:57.103Z (over 1 year ago)
- Topics: backend, fiber, go, golang, mongodb, webapi
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scooter Rental API
Bu proje, scooter kiralama işlemlerini yönetmek için bir RESTful API'dir. Go dili ve MongoDB kullanılarak geliştirilmiştir.
## Özellikler
- Tüm scooter'ları listeleme
- Yeni scooter oluşturma
- Scooter konumunu güncelleme
- Scooter durumunu güncelleme
- Kiralama işlemleri (başlatma ve tamamlama)
- Kullanıcı kiralamalarını listeleme
## Kurulum
1. **Projeyi Klonlayın:**
```bash
git clone https://github.com/yourusername/scoter-web-api.git
cd scoter-web-api
2. **Bağımlılıkları Yükleyin:**
```bash
go mod download
```
4. **MongoDB'yi Başlatın:** MongoDB'yi kurun ve başlatın.
5. **Uygulamayı Başlatın:**
```bash
go run cmd/api/main.go
```
Uygulama varsayılan olarak `http://localhost:8080` adresinde çalışacaktır.
## API Kullanımı
### Scooter API
- **GET** `/scooters`: Tüm scooter'ları listeleyin.
- **POST** `/scooters`: Yeni scooter ekleyin.
- **PATCH** `/scooters/{id}/location`: Scooter konumunu güncelleyin.
- **PATCH** `/scooters/{id}/status`: Scooter durumunu güncelleyin.
### Rental API
- **POST** `/rentals`: Kiralama işlemini başlatın.
- **GET** `/rentals/user/{user_id}`: Kullanıcının kiralamalarını listeleyin.
- **PATCH** `/rentals/{id}/complete`: Kiralamayı tamamlayın.
### Katkıda Bulunanlar
[Yasin Güneş](https://github.com/Yasin4261)
## Lisans
Bu proje MIT Lisansı altında lisanslanmıştır. Daha fazla bilgi için `LICENSE` dosyasına bakın.