All Projects → PHDevsConnect → phdevsdir

PHDevsConnect / phdevsdir

Licence: other
WIP: A Directory app for web devs in Port Harcourt, Nigeria. Built with React and Express

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to phdevsdir

nigerian-laws
A compilation of the Laws, Enactments and Subsidiary Legislation of the Federation of Nigeria in Markdown
Stars: ✭ 15 (+7.14%)
Mutual labels:  nigeria
kb-proxy
kb-proxy 是一个可本地部署的、提供代理功能、接口测试管理、支持在线Mock、Host环境管理的在线工具平台。
Stars: ✭ 52 (+271.43%)
Mutual labels:  postman
httpyac
Command Line Interface for *.http and *.rest files. Connect with http, gRPC, WebSocket and MQTT
Stars: ✭ 103 (+635.71%)
Mutual labels:  postman
developer-titles
(fictional/awesome/random/funny/obsolete) Developer Titles 💥
Stars: ✭ 12 (-14.29%)
Mutual labels:  developers
naija-senate-contact-list
This repo is a web app with list of the 9th Assembly senators in Nigeria.
Stars: ✭ 16 (+14.29%)
Mutual labels:  nigeria
postman-runtime
www.postman.com/downloads
Stars: ✭ 160 (+1042.86%)
Mutual labels:  postman
reky
Reky is an opensource API development platform. It automatically visualizes API response with outstanding graphs & tables.
Stars: ✭ 22 (+57.14%)
Mutual labels:  postman
mapi-action
🤖 Run a Mayhem for API scan in GitHub Actions
Stars: ✭ 16 (+14.29%)
Mutual labels:  postman
NanoSoft
A forum system built using plain php dedicated for C#.NET Developers
Stars: ✭ 20 (+42.86%)
Mutual labels:  developers
awesome-newman-html-template
😎 A newman html report very detailed
Stars: ✭ 63 (+350%)
Mutual labels:  postman
tech-hubs
🏠 🏢 Where are the tech hubs in Nigeria?
Stars: ✭ 142 (+914.29%)
Mutual labels:  nigeria
govote-api
Simple Node.js API to help people find locations to get PVCs and Vote in the upcoming Nigeria General Elections.
Stars: ✭ 15 (+7.14%)
Mutual labels:  nigeria
postman-webex
Postman collections for Webex REST APIs
Stars: ✭ 97 (+592.86%)
Mutual labels:  postman
Nigerian-states-api
An api for basic information about all 36 states in Nigeria
Stars: ✭ 26 (+85.71%)
Mutual labels:  nigeria
postman-to-markdown
Generate documentation in markdown from postman documentation.
Stars: ✭ 30 (+114.29%)
Mutual labels:  postman
developerIdentity
Developers Identity(Portfolio) Template that helps you showcase your work and skills as a software developer.
Stars: ✭ 21 (+50%)
Mutual labels:  developers
jersey-jwt-springsecurity
Example of REST API with JWT authentication using Spring Boot, Spring Security, Jersey and Jackson.
Stars: ✭ 44 (+214.29%)
Mutual labels:  postman
bogota
Bogotá, Colombia 🍺
Stars: ✭ 22 (+57.14%)
Mutual labels:  developers
media-api-samples
Sample Code | Media APIs | Dolby.io
Stars: ✭ 20 (+42.86%)
Mutual labels:  postman
PostmanCollection
PlayFab Postman Collection
Stars: ✭ 32 (+128.57%)
Mutual labels:  postman

PH Developers Directory

CircleCI

A Directory app for web devs in Port Harcourt, Nigeria. Built with React, Express and MongoDB

API DOCS

GET https://phdevsdir.herokuapp.com/api/v1/developers - display all developers POST https://phdevsdir.herokuapp.com/api/v1/developers - create a new developer Params

  • first_name (String) required,
  • last_name (String) required
  • email (String) required
  • stack (Comma Delimited String) optional
  • github_url (String) required

Using the API

Here are some examples to aid in using the API. This API currently makes use of one endpoint (/api/v1/developers), with two HTTP verbs attached to it (GET & POST).

JavaScript

// using XMLHttpRequest

// GET
let request = new XMLHttpRequest();
request.open('Get', "https://phdevsdir.herokuapp.com/api/v1/developers");
request.send();

request.onreadystatechange = (e) => {
  if(request.readyState == 4 && request.status == 200) {
    // request is successful, lets party
    let response = JSON.parse(request.responseText);
    console.log(response);
  }
}

// POST
let request = new XMLHttpRequest();
request.open('POST', 'https://phdevsdir.herokuapp.com/api/v1/developers');
let params = 'params=value';

request.setRequestHeader('Content-Type', 'application/json'); // application/x-www-form-urlencoded, etc

request.onreadystatechange = (e) => {
  if(request.readyState == 4 && request.status == 200) {
    let response = JSON.parse(request.responseText);
    console.log(response);
  }
}
request.send(params);

// Using axios (its easy af!)
axios.get('https://phdevsdir.herokuapp.com/api/v1/developers')
  .then( (response) => {
    console.log(response);
    })
  .catch( (err) => {
    console.log(err);
    });

axios.post('https://phdevsdir.herokuapp.com/api/v1/developers', {
  first_name: 'John',
  second_name: 'Doe'
  })
  .then( (response) => {
    console.log(response);
    })
  .catch( (err) => {
    console.log(err);
    });

PHP

<?php
  // GET
  $r = new HttpRequest('https://phdevsdir.herokuapp.com/api/v1/developers', HttpRequest::METH_GET);
  try {
    $r->send();
    if ($r->getResponseCode() == 200) {
        $response = $r->getResponseBody();
    }
  } catch (HttpException $ex) {
    echo $ex;
  }

  // POST
  $r = new HttpRequest('https://phdevsdir.herokuapp.com/api/v1/developers', HttpRequest::METH_POST);
  $r->addPostFields(['first_name' => 'john', 'last_name' => 'doe']);
  try {
    echo $r->send()->getBody();
  } catch (HttpException $ex) {
    echo $ex;
  }
?>

Go

func main() {
  // GET
  request, err := http.Get("https://phdevsdir.herokuapp.com/api/v1/developers")
  if err != nil {
    log.Println(err)
  }

  defer request.Body.Close()

  requestBytes, err := ioutil.ReadAll(request.Body)
  if err != nil {
    log.Println(err)
  }
  response := string(bodyBytes)
  log.Print(response)

  // POST
  body := []bytes("firstname=john&lastname=doe")
  req, err := http.Post("https://phdevsdir.herokuapp.com/api/v1/developers", "body/type", bytes.NewBuffer(body))

  if err != nil {
    log.Println(err)
  }
  defer req.Body.Close()
  bodyBytes, err := ioutil.ReadAll(res.Body)
  if err != nil {
    log.Println(err)
  }
  res := string(bodyBytes)
}

Python

import requests
import json

// GET
r = requests.get("https://phdevsdir.herokuapp.com/api/v1/developers")
print r.content

// POST
url = "https://phdevsdir.herokuapp.com/api/v1/developers"
payload = {'first_name': 'John', 'last_name': 'Doe'}
response = requests.post(url, data=json.dumps(payload))
print(response.text)

Contributing

  • Fork the repo
  • Make your changes
  • Create a PR
  • Create an Issue for feature requests

Using Postman to test routes

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].