Git Product home page Git Product logo

mtaaapi's Introduction

Mtaa API

Mtaa API is a simple REST(And later GraphQL) API for accessing Tanzania locations.

Mtaa API is powered by mtaa.

Why?

Most of the time when coding, we found ourselves in need of some location data, especially for our country, Tanzania.

We didn't like the idea of scraping some public sites because we had the feeling that we was spending more time understanding the site and cleaning the data than focusing on my task.

But we liked the idea of a public API for developers. So I decided to code a little Flask server inspired by our tanzania-locations-db, mtaa and here is Mtaa API.

You can find it running here and are free to use it in your developments: https://mtaa-api.herokuapp.com/api.

I hope you will find it useful.

Features

  • No registration
  • Zero-config
  • Basic API
  • Cross-domain (CORS)
  • Supports GET and POST(GraphQL) verbs
  • Compatible with React, Angular, Vue, Ember, ...

Guide

For examples and more, documentation you can visit https://mtaa-api.herokuapp.com/docs

mtaaapi's People

Contributors

anorebel avatar kalebu avatar maotora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kalebu

mtaaapi's Issues

It includes "postal_codes" from wards

Hello,

Great work with the API.

I think there are issues where you are including ward_postal_code data in "wards" instead of it being on its own field/object.

This is only happening in "wards" response.

TTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 260
Content-Type: application/json
Date: Sun, 21 Feb 2021 06:12:40 GMT
Server: gunicorn/20.0.4
Via: 1.1 vegur

{
    "post_code": "413",
    "wards": [
        "ward_post_code",
        "Bahi",
        "Ibihwa",
        "Ilindi",
        "Kigwe",
        "Mpamamtwa",
        "Chali",
        "Chikola",
        "Chipanga",
        "Nondwa",
        "Mpalanga",
        "Lamaiti",
        "Makanda",
        "Msisi",
        "Mundemu",
        "Zanka",
        "Chibelela",
        "Ibugule",
        "Mtitaa",
        "Mwitikira",
        "Chifutuka",
        "Mpinga",
        "Babayu"
    ]
}

Heroku app is down

A request to Heroku results into Status: 503 Service Unavailable
probably something broke during deployment !!

Exceptional handling should be added

When someone tries to access a location that's is not there,
the current implementation just throws 500 Internal Error

We can add exception handling to handle this and returning empty [ ] or { }
when exceptional is thrown

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.