PHP Classes

NatterBase PHP Get Country API: API to get information about countries

Recommend this page to a friend!
  Info   View files Documentation   View files View files (84)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 79 All time: 10,098 This week: 206Up
Version License PHP version Categories
natterbase 1.0.0The PHP License5PHP 5, Web services, Geography
Description 

Author

This package provides an API to get information about countries.

It can can handle API HTTP requests that can perform several types of operations to manage information about countries stored in a database. Currently it can:

- Signup a new user of the API
- Login as a given API user
- Insert a new country to the list of countries associated to a continent
- Update the list of countries with a country to be associated to a continent
- Get the list of countries
- Delete a given country from the list of countries

Innovation Award
PHP Programming Innovation award nominee
January 2020
Number 8
Many applications need to obtain information about countries that is vital for the operations that those applications need to perform, like for instance, what is the continent that a country belongs.

This package provides an API that can make country related information be provided to many applications at once.

Since the country information that is provided by the API can be also be updated via the same API, this package can be used to dynamically update the information related with countries that it provides.

Manuel Lemos
Picture of Zacchaeus Bolaji
  Performance   Level  
Name: Zacchaeus Bolaji <contact>
Classes: 15 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 250315 in Nigeria Nigeria
Week rank: 93 Up6 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 10x

Documentation

natterbase

Create a RESTFUL API for performing CRUD operations on a Country resource using laravel PHP framework.

Getting Started

  • Copy the `.env.example` file to `.env` and edit the details for your environment
  • Run `composer install` to install all php dependencies
  • Create your database and set the proper environment variables in your `.env` file.
  • Run `php artisan migrate --seed` to get the database up and running
  • Run `php artisan jwt:secret` to set jwt secret

Routes

POST - /signup payload => { 'username' => ,

		'email' => ,
		'first_name' => ,
		'last_name' => ,
		'password' => ,

}

POST - /login payload => { 'email' => ,

'password' => ,

}

POST - /countries payload => { 'name' => ,

	'continent' => ,

}

PUT - /countries/:id payload => { 'name' => ,

	'continent' => ,

}

DELETE - /countries/:id payload => none

GET - /countries payload => none

POST - /activities payload => none

Unit Tests

run php vendor/phpunit/phpunit/phpunit in Command line/terminal


  Files folder image Files  
File Role Description
Files folder image.idea (5 files)
Files folder imageapp (3 files, 4 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (14 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (3 files, 2 directories)
Files folder imageresources (4 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Plain text file artisan Class Class source
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 package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file webpack.mix.js Data Auxiliary data
Accessible without login Plain text file yarn.lock Data Auxiliary data

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file blade.xml Data Auxiliary data
  Accessible without login Plain text file djunehor.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  /  app  
File Role Description
Files folder imageConsole (1 file)
Files folder imageExceptions (1 file)
Files folder imageHttp (1 file, 2 directories)
Files folder imageProviders (5 files)
  Plain text file Activity.php Class Class source
  Plain text file Country.php Class Class source
  Plain text file User.php Class Class source

  Files folder image Files  /  app  /  Console  
File Role Description
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Exceptions  
File Role Description
  Plain text file Handler.php Class Class source

  Files folder image Files  /  app  /  Http  
File Role Description
Files folder imageControllers (4 files)
Files folder imageMiddleware (6 files)
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  
File Role Description
  Plain text file ActivityController.php Class Class source
  Plain text file Controller.php Class Class source
  Plain text file CountryController.php Class Class source
  Plain text file UserController.php Class Class source

  Files folder image Files  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file CheckForMaintenanceMode.php Class Class source
  Plain text file EncryptCookies.php Class Class source
  Plain text file RedirectIfAuthenticated.php Class Class source
  Plain text file TrimStrings.php Class Class source
  Plain text file TrustProxies.php Class Class source
  Plain text file VerifyCsrfToken.php Class Class source

  Files folder image Files  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source
  Plain text file AuthServiceProvider.php Class Class source
  Plain text file BroadcastServiceProvider.php Class Class source
  Plain text file EventServiceProvider.php Class Class source
  Plain text file RouteServiceProvider.php Class Class source

  Files folder image Files  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file auth.php Class Class source
  Accessible without login Plain text file broadcasting.php Aux. Auxiliary script
  Accessible without login Plain text file cache.php Aux. Auxiliary script
  Accessible without login Plain text file database.php Aux. Auxiliary script
  Accessible without login Plain text file filesystems.php Aux. Auxiliary script
  Accessible without login Plain text file hashing.php Aux. Auxiliary script
  Plain text file jwt.php Class Class source
  Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Auxiliary script
  Accessible without login Plain text file queue.php Aux. Auxiliary script
  Plain text file services.php Class Class source
  Accessible without login Plain text file session.php Aux. Auxiliary script
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (3 files)
Files folder imageseeds (3 files)

  Files folder image Files  /  database  /  factories  
File Role Description
  Plain text file UserFactory.php Class Class source

  Files folder image Files  /  database  /  migrations  
File Role Description
  Plain text file 2014_10_12_000000_create_users_table.php Class Class source
  Plain text file 2019_03_05_142904_...countries_table.php Class Class source
  Plain text file 2019_03_05_142920_...ctivities_table.php Class Class source

  Files folder image Files  /  database  /  seeds  
File Role Description
  Plain text file CountrySeeder.php Class Class source
  Plain text file DatabaseSeeder.php Class Class source
  Plain text file UserSeeder.php Class Class source

  Files folder image Files  /  public  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file index.php Class Class source
  Accessible without login Plain text file robots.txt Doc. Documentation

  Files folder image Files  /  public  /  css  
File Role Description
  Accessible without login Plain text file app.css Data Auxiliary data

  Files folder image Files  /  public  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data

  Files folder image Files  /  resources  
File Role Description
Files folder imagejs (2 files, 1 directory)
Files folder imagelang (1 directory)
Files folder imagesass (2 files)
Files folder imageviews (1 file)

  Files folder image Files  /  resources  /  js  
File Role Description
Files folder imagecomponents (1 file)
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.js Data Auxiliary data

  Files folder image Files  /  resources  /  js  /  components  
File Role Description
  Accessible without login Plain text file ExampleComponent.vue Data Auxiliary data

  Files folder image Files  /  resources  /  lang  
File Role Description
Files folder imageen (4 files)

  Files folder image Files  /  resources  /  lang  /  en  
File Role Description
  Accessible without login Plain text file auth.php Aux. Auxiliary script
  Accessible without login Plain text file pagination.php Aux. Auxiliary script
  Accessible without login Plain text file passwords.php Aux. Auxiliary script
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file app.scss Data Auxiliary data
  Accessible without login Plain text file _variables.scss Data Auxiliary data

  Files folder image Files  /  resources  /  views  
File Role Description
  Accessible without login Plain text file welcome.blade.php Aux. Auxiliary script

  Files folder image Files  /  routes  
File Role Description
  Accessible without login Plain text file api.php Example Example script
  Accessible without login Plain text file channels.php Example Example script
  Accessible without login Plain text file console.php Example Example script
  Accessible without login Plain text file web.php Aux. Auxiliary script

  Files folder image Files  /  tests  
File Role Description
Files folder imageFeature (3 files)
Files folder imageUnit (1 file)
  Plain text file CreatesApplication.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  Feature  
File Role Description
  Plain text file ActivityTest.php Class Class source
  Plain text file CountryTest.php Class Class source
  Plain text file UserTest.php Class Class source

  Files folder image Files  /  tests  /  Unit  
File Role Description
  Plain text file ExampleTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:79
This week:0
All time:10,098
This week:206Up