Farm Price: API to get the prices from agriculture markets

Recommend this page to a friend!
  Info   View files View files (203)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-08-26 (16 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 25 All time: 10,318 This week: 97Up
Version License PHP version Categories
farmprice 1.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
Nominee
Vote
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: 4 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 3x

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  
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

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file farmprice.iml Data Auxiliary data
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data
  Accessible without login Plain text file workspace.xml Data Auxiliary data

  Files folder image Files  /  public  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageclasses (1 file)
Files folder imagedb-config (2 files)
Files folder imagedb (1 file)
Files folder imageroutes (1 file)

  Files folder image Files  /  src  /  classes  
File Role Description
  Accessible without login Plain text file functions.php Aux. Auxiliary script

  Files folder image Files  /  src  /  db-config  
File Role Description
  Plain text file connect.php Class Class source
  Plain text file models.php Class Class source

  Files folder image Files  /  src  /  db  
File Role Description
  Accessible without login Plain text file farmprice.sql Data Auxiliary data

  Files folder image Files  /  src  /  routes  
File Role Description
  Accessible without login Plain text file routes.php Example Example script

  Files folder image Files  /  vendor  
File Role Description
Files folder imagecomposer (9 files)
Files folder imagecontainer-interop (1 directory)
Files folder imagenikic (1 directory)
Files folder imagepimple (1 directory)
Files folder imagepsr (2 directories)
Files folder imageslim (1 directory)
Files folder imagevlucas (1 directory)
  Accessible without login Plain text file autoload.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  composer  
File Role Description
  Accessible without login Plain text file autoload_classmap.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_files.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_namespaces.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_psr4.php Aux. Auxiliary script
  Plain text file autoload_real.php Class Class source
  Plain text file autoload_static.php Class Class source
  Plain text file ClassLoader.php Class Class source
  Accessible without login Plain text file installed.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  container-interop  
File Role Description
Files folder imagecontainer-interop (3 files, 2 directories)

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  
File Role Description
Files folder imagedocs (4 files, 1 directory)
Files folder imagesrc (1 directory)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  /  docs  
File Role Description
Files folder imageimages (3 files)
  Accessible without login Plain text file ContainerInterface-meta.md Data Auxiliary data
  Plain text file ContainerInterface.md Class Class source
  Accessible without login Plain text file Delegate-lookup-meta.md Data Auxiliary data
  Accessible without login Plain text file Delegate-lookup.md Data Auxiliary data

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  /  docs  /  images  
File Role Description
  Accessible without login Image file interoperating_containers.png Data Auxiliary data
  Accessible without login Image file priority.png Icon Icon image
  Accessible without login Image file side_by_side_containers.png Icon Icon image

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  /  src  
File Role Description
Files folder imageInterop (1 directory)

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  /  src  /  Interop  
File Role Description
Files folder imageContainer (1 file, 1 directory)

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  /  src  /  Interop  /  Container  
File Role Description
Files folder imageException (2 files)
  Plain text file ContainerInterface.php Class Class source

  Files folder image Files  /  vendor  /  container-interop  /  container-interop  /  src  /  Interop  /  Container  /  Exception  
File Role Description
  Plain text file ContainerException.php Class Class source
  Plain text file NotFoundException.php Class Class source

  Files folder image Files  /  vendor  /  nikic  
File Role Description
Files folder imagefast-route (7 files, 2 directories)

  Files folder image Files  /  vendor  /  nikic  /  fast-route  
File Role Description
Files folder imagesrc (8 files, 3 directories)
Files folder imagetest (2 files, 3 directories)
  Accessible without login Plain text file .hhconfig Data Auxiliary data
  Accessible without login Plain text file .travis.yml Data Auxiliary data
  Accessible without login Plain text file composer.json Data Auxiliary data
  Plain text file FastRoute.hhi Class Class source
  Accessible without login Plain text file LICENSE Lic. License text
  Accessible without login Plain text file phpunit.xml Data Auxiliary data
  Plain text file README.md Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  src  
File Role Description
Files folder imageDataGenerator (5 files)
Files folder imageDispatcher (5 files)
Files folder imageRouteParser (1 file)
  Plain text file BadRouteException.php Class Class source
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Plain text file DataGenerator.php Class Class source
  Plain text file Dispatcher.php Class Class source
  Accessible without login Plain text file functions.php Example Example script
  Plain text file Route.php Class Class source
  Plain text file RouteCollector.php Class Class source
  Plain text file RouteParser.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  src  /  DataGenerator  
File Role Description
  Plain text file CharCountBased.php Class Class source
  Plain text file GroupCountBased.php Class Class source
  Plain text file GroupPosBased.php Class Class source
  Plain text file MarkBased.php Class Class source
  Plain text file RegexBasedAbstract.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  src  /  Dispatcher  
File Role Description
  Plain text file CharCountBased.php Class Class source
  Plain text file GroupCountBased.php Class Class source
  Plain text file GroupPosBased.php Class Class source
  Plain text file MarkBased.php Class Class source
  Plain text file RegexBasedAbstract.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  src  /  RouteParser  
File Role Description
  Plain text file Std.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  test  
File Role Description
Files folder imageDispatcher (5 files)
Files folder imageHackTypechecker (1 file, 1 directory)
Files folder imageRouteParser (1 file)
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Plain text file RouteCollectorTest.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  test  /  Dispatcher  
File Role Description
  Plain text file CharCountBasedTest.php Class Class source
  Plain text file DispatcherTest.php Class Class source
  Plain text file GroupCountBasedTest.php Class Class source
  Plain text file GroupPosBasedTest.php Class Class source
  Plain text file MarkBasedTest.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  test  /  HackTypechecker  
File Role Description
Files folder imagefixtures (3 files)
  Plain text file HackTypecheckerTest.php Class Class source

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  test  /  HackTypechecker  /  fixtures  
File Role Description
  Plain text file all_options.php Class Class source
  Accessible without login Plain text file empty_options.php Aux. Auxiliary script
  Accessible without login Plain text file no_options.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  nikic  /  fast-route  /  test  /  RouteParser  
File Role Description
  Plain text file StdTest.php Class Class source

  Files folder image Files  /  vendor  /  pimple  
File Role Description
Files folder imagepimple (6 files, 2 directories)

  Files folder image Files  /  vendor  /  pimple  /  pimple  
File Role Description
Files folder imageext (1 directory)
Files folder imagesrc (1 directory)
  Accessible without login Plain text file .travis.yml Data Auxiliary data
  Accessible without login Plain text file CHANGELOG Data Auxiliary data
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text
  Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
  Accessible without login Plain text file README.rst Doc. Documentation

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  ext  
File Role Description
Files folder imagepimple (6 files, 1 directory)

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  ext  /  pimple  
File Role Description
Files folder imagetests (22 files)
  Accessible without login Plain text file config.m4 Data Auxiliary data
  Accessible without login Plain text file config.w32 Data Auxiliary data
  Accessible without login Plain text file php_pimple.h Data Auxiliary data
  Accessible without login Plain text file pimple.c Data Auxiliary data
  Accessible without login Plain text file pimple_compat.h Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  ext  /  pimple  /  tests  
File Role Description
  Accessible without login Plain text file 001.phpt Example Example script
  Accessible without login Plain text file 002.phpt Example Example script
  Accessible without login Plain text file 003.phpt Example Example script
  Accessible without login Plain text file 004.phpt Example Example script
  Plain text file 005.phpt Class Class source
  Plain text file 006.phpt Class Class source
  Accessible without login Plain text file 007.phpt Example Example script
  Accessible without login Plain text file 008.phpt Example Example script
  Accessible without login Plain text file 009.phpt Example Example script
  Plain text file 010.phpt Class Class source
  Plain text file 011.phpt Class Class source
  Accessible without login Plain text file 012.phpt Example Example script
  Accessible without login Plain text file 013.phpt Example Example script
  Accessible without login Plain text file 014.phpt Example Example script
  Accessible without login Plain text file 015.phpt Example Example script
  Accessible without login Plain text file 016.phpt Example Example script
  Accessible without login Plain text file 017.phpt Example Example script
  Accessible without login Plain text file 017_1.phpt Example Example script
  Plain text file 018.phpt Class Class source
  Plain text file 019.phpt Class Class source
  Accessible without login Plain text file bench.phpb Example Example script
  Accessible without login Plain text file bench_shared.phpb Example Example script

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  
File Role Description
Files folder imagePimple (3 files, 3 directories)

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  /  Pimple  
File Role Description
Files folder imageException (4 files)
Files folder imagePsr11 (2 files)
Files folder imageTests (3 files, 2 directories)
  Plain text file Container.php Class Class source
  Plain text file ServiceIterator.php Class Class source
  Plain text file ServiceProviderInterface.php Class Class source

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  /  Pimple  /  Exception  
File Role Description
  Plain text file ExpectedInvokableException.php Class Class source
  Plain text file FrozenServiceException.php Class Class source
  Plain text file InvalidServiceIdentifierException.php Class Class source
  Plain text file UnknownIdentifierException.php Class Class source

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  /  Pimple  /  Psr11  
File Role Description
  Plain text file Container.php Class Class source
  Plain text file ServiceLocator.php Class Class source

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  /  Pimple  /  Tests  
File Role Description
Files folder imageFixtures (4 files)
Files folder imagePsr11 (2 files)
  Plain text file PimpleServiceProviderInterfaceTest.php Class Class source
  Plain text file PimpleTest.php Class Class source
  Plain text file ServiceIteratorTest.php Class Class source

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  /  Pimple  /  Tests  /  Fixtures  
File Role Description
  Plain text file Invokable.php Class Class source
  Plain text file NonInvokable.php Class Class source
  Plain text file PimpleServiceProvider.php Class Class source
  Plain text file Service.php Class Class source

  Files folder image Files  /  vendor  /  pimple  /  pimple  /  src  /  Pimple  /  Tests  /  Psr11  
File Role Description
  Plain text file ContainerTest.php Class Class source
  Plain text file ServiceLocatorTest.php Class Class source

  Files folder image Files  /  vendor  /  psr  
File Role Description
Files folder imagecontainer (3 files, 1 directory)
Files folder imagehttp-message (4 files, 1 directory)

  Files folder image Files  /  vendor  /  psr  /  container  
File Role Description
Files folder imagesrc (3 files)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  vendor  /  psr  /  container  /  src  
File Role Description
  Plain text file ContainerExceptionInterface.php Class Class source
  Plain text file ContainerInterface.php Class Class source
  Plain text file NotFoundExceptionInterface.php Class Class source

  Files folder image Files  /  vendor  /  psr  /  http-message  
File Role Description
Files folder imagesrc (7 files)
  Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  vendor  /  psr  /  http-message  /  src  
File Role Description
  Plain text file MessageInterface.php Class Class source
  Plain text file RequestInterface.php Class Class source
  Plain text file ResponseInterface.php Class Class source
  Plain text file ServerRequestInterface.php Class Class source
  Plain text file StreamInterface.php Class Class source
  Plain text file UploadedFileInterface.php Class Class source
  Plain text file UriInterface.php Class Class source

  Files folder image Files  /  vendor  /  slim  
File Role Description
Files folder imageslim (2 files, 1 directory)

  Files folder image Files  /  vendor  /  slim  /  slim  
File Role Description
Files folder imageSlim (12 files, 4 directories)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE.md Lic. License text

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  
File Role Description
Files folder imageException (6 files)
Files folder imageHandlers (6 files, 1 directory)
Files folder imageHttp (11 files)
Files folder imageInterfaces (6 files, 1 directory)
  Plain text file App.php Class Class source
  Plain text file CallableResolver.php Class Class source
  Plain text file CallableResolverAwareTrait.php Class Class source
  Plain text file Collection.php Class Class source
  Plain text file Container.php Class Class source
  Plain text file DefaultServicesProvider.php Class Class source
  Plain text file DeferredCallable.php Class Class source
  Plain text file MiddlewareAwareTrait.php Class Class source
  Plain text file Routable.php Class Class source
  Plain text file Route.php Class Class source
  Plain text file RouteGroup.php Class Class source
  Plain text file Router.php Class Class source

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  /  Exception  
File Role Description
  Plain text file ContainerException.php Class Class source
  Plain text file ContainerValueNotFoundException.php Class Class source
  Plain text file InvalidMethodException.php Class Class source
  Plain text file MethodNotAllowedException.php Class Class source
  Plain text file NotFoundException.php Class Class source
  Plain text file SlimException.php Class Class source

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  /  Handlers  
File Role Description
Files folder imageStrategies (2 files)
  Plain text file AbstractError.php Class Class source
  Plain text file AbstractHandler.php Class Class source
  Plain text file Error.php Class Class source
  Plain text file NotAllowed.php Class Class source
  Plain text file NotFound.php Class Class source
  Plain text file PhpError.php Class Class source

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  /  Handlers  /  Strategies  
File Role Description
  Plain text file RequestResponse.php Class Class source
  Plain text file RequestResponseArgs.php Class Class source

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  /  Http  
File Role Description
  Plain text file Body.php Class Class source
  Plain text file Cookies.php Class Class source
  Plain text file Environment.php Class Class source
  Plain text file Headers.php Class Class source
  Plain text file Message.php Class Class source
  Plain text file Request.php Class Class source
  Plain text file RequestBody.php Class Class source
  Plain text file Response.php Class Class source
  Plain text file Stream.php Class Class source
  Plain text file UploadedFile.php Class Class source
  Plain text file Uri.php Class Class source

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  /  Interfaces  
File Role Description
Files folder imageHttp (3 files)
  Plain text file CallableResolverInterface.php Class Class source
  Plain text file CollectionInterface.php Class Class source
  Plain text file InvocationStrategyInterface.php Class Class source
  Plain text file RouteGroupInterface.php Class Class source
  Plain text file RouteInterface.php Class Class source
  Plain text file RouterInterface.php Class Class source

  Files folder image Files  /  vendor  /  slim  /  slim  /  Slim  /  Interfaces  /  Http  
File Role Description
  Plain text file CookiesInterface.php Class Class source
  Plain text file EnvironmentInterface.php Class Class source
  Plain text file HeadersInterface.php Class Class source

  Files folder image Files  /  vendor  /  vlucas  
File Role Description
Files folder imagephpdotenv (2 files, 1 directory)

  Files folder image Files  /  vendor  /  vlucas  /  phpdotenv  
File Role Description
Files folder imagesrc (3 files, 1 directory)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE.txt Doc. Documentation

  Files folder image Files  /  vendor  /  vlucas  /  phpdotenv  /  src  
File Role Description
Files folder imageException (5 files)
  Plain text file Dotenv.php Class Class source
  Plain text file Loader.php Class Class source
  Plain text file Validator.php Class Class source

  Files folder image Files  /  vendor  /  vlucas  /  phpdotenv  /  src  /  Exception  
File Role Description
  Plain text file ExceptionInterface.php Class Class source
  Plain text file InvalidCallbackException.php Class Class source
  Plain text file InvalidFileException.php Class Class source
  Plain text file InvalidPathException.php Class Class source
  Plain text file ValidationException.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:25
This week:0
All time:10,318
This week:97Up
For more information send a message to info at phpclasses dot org.