API for Instagram copy, allowing users to create accounts, upload images and comment on them.
Project created with .NET6.
- Create Postgre database and put the credentials into
server\Mijalski.Imagegram.Server\appsettings.Development.json
- Run the project with
dotnet build && dotnet run
- Ability to create new accounts
- Ability to login
- Ability to remove account with all data (posts, comments)
- Ability to add posts with images (only accepting JPG)
- Ability to add comments to posts
- Ability to get list of posts ordered by comment count (showing only 2 most recent) [skip/take based pagination]
POST name and password to /accounts to create account
POST name and password to /accounts/login to receive the token
To create post you need to be authorized (append the token in header, like so: Authentication: Bearer {MY-TOKEN}
POST to /posts sample image PNG data with caption, in return you will receive the POST ID
POST to /posts/{POST-ID}/comments with some comment to create one
GET /posts to receive the list of images, by comment count descending
DELETE /accounts to remove all your data