PHP Classes

Farm Price: API to get the prices from agriculture markets

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 67 All time: 10,355 This week: 455Up
Version License PHP version Categories
farmprice 1.0.0The PHP License5PHP 5, Web services, Business
Description 

Author

This package implements API to get the prices from agriculture markets.

It provides several API end points that can be called using HTTP requests to store and retrieve the prices of agriculture products. Currently, it can:

- Register a new farmer user
- Get the details about a farmer user
- Add farm products and the respective prices
- List available products in the market
- Get the prices of specific products

Innovation Award
PHP Programming Innovation award nominee
August 2021
Number 7
Marketplaces are implemented on the Internet in sites that allow customers to buy from suppliers, having the marketplace software for advertising, sales, and billing.

This package implements an API that can back a marketplace for agriculture products.

Using this API, applications can implement different user interfaces to allow the users to negotiate agriculture products using computers or mobile phones from anywhere in the world, wherever they are located.

Manuel Lemos
Picture of uche
Name: uche <contact>
Classes: 9 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 7x

 

Details

farmprice

An API developed to easily get current farm prices of different in the Nigerian agricultural market. API was developed using slim v3

I have added a sample database data in the src/db/ folder. Simply import.

Clone this repo and call these endpoints using the defined RESTFul methods

POST '/api/v1/user/new' Pass: {'name' => 'name', 'state' => 'state', 'about' => 'about'} - Add a farmer

GET '/api/v1/user/{id}' - Get details of a farmer


POST '/api/v1/farm/produce/new' - Pass : {'name' => 'name', 'description' => 'description'} Add a farm produce

POST '/api/v1/farm/produce/add/price' - Pass : {'userId' => 'userId', 'produceId' => 'produceId', 'pricePerKg' => 'pricePerKg'}- Add price for a farm produce

PUT '/api/v1/farm/produce/add/price' - Pass : {'userId' => 'userId', 'produceId' => 'produceId', 'pricePerKg' => 'pricePerKg'} Update farm price


GET '/api/v1/farm/produce/price/{id}' - fetch prices of a particular produce

GET '/api/v1/farm/produce/list' - fetch all produces

Keep in touch: radioactive.uche11@gmail.com


  Files folder image Files (203)  
File Role Description
Files folder image.idea (4 files)
Files folder imagepublic (1 file)
Files folder imagesrc (4 directories)
Files folder imagevendor (1 file, 7 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Plain text file test.php Class Class source
Plain text file test2.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:67
This week:0
All time:10,355
This week:455Up