Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.2 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.2 KB

Images Transformer

This project is part of the lessons from Gophercises where we learn how to build how to build an application for transforming images to different shapes using Primitive.

Run Locally

Clone the project

  git@github.com:jwambugu/images-transformer.git

Go to the project directory

  cd images-transformer

Copy the configuration file and update your configuration

  cp .keys.sample.json .keys.json

Start the server

   go run cmd/api/*

API Reference

Get all available modes

  GET /v1/modes

Get the number of shapes

  GET /v1/modes/no-of-shapes

Upload image to transform

  POST /api/images
Parameter Type Description
photos file Required. The image to upload.
mode int Required. The primitive mode to use. Expects 0-8
shapes int Required. The number of shapes to render.