/gisp-data-api

Examples of how to use data APIs from various programming languages. Created for the Gateway to Industry Schools Program (GISP).

Primary LanguageHTMLMIT LicenseMIT

Data API Examples

Coding demo about data APIs, JavaScript, Python, web servers, web techonologies and an ask-me-anything session with David Beitey (@davidjb).

Delivered as part of an industry/educator partnership formed in the ICT Gateway to Industry Schools Program (GISP) initiative.

Get a copy

Scan me

Visit https://github.com/davidjb/gisp-data-api to either view, download or take a git clone of the code from GitHub or scan the above QR code.

Examples

Outline

  • Intro — outline, ask questions, introduction

  • Background — who I am, my experience

  • APIs (Application Programming Interfaces):

    • Demo and walkthrough of examples

    • API = Bistro: walk in, line up, there is a defined menu of offerings

      • You ask for what you want, they make it and deliver it.
      • You don't mind/can't see or control how they make your spaghetti, just that you get it
      • Some places may offer flexibility (V, GF, etc) but you have to ask for it
      • Not every restaurant is the same
    • General outline: what they are and aren't, how they work

      • REST (Representational State Transfer) — software style involving textual representation of resources that allow reading/modification using a defined set of operations. In short, it's about using HTTP methods (GET/POST/PUT/DELETE etc) to access/change data on a remote server in a defined way.

        • REST ⋍ Roads: except all rules are "should"/"might", signs may be wrong/missing, traffic lights (may be wrong!), congestion, potholes, toll bridges, gated communities, roads may just end
    • Data formats + view examples:

    • Tools & documentation vary wildly between APIs

    • Considerations

      • All APIs are different
      • Programming language / environment being using (Python, JavaScript, PHP, etc)
      • Versoning: APIs will often have v1, v2, etc in their URLs indicating structure
      • CORS: Cross-origin resource sharing - ability to load data across domains in browser
      • Rate Limiting: limits on allowed requests, by user/computer/network
      • Access Control: some APIs require keys or paid access (e.g. Google Maps API)
      • Error Handling: code should expect & handle errors (network failure, API offline, invalid data, etc)
      • Caching: hitting same API repeatedly is wasteful, leverage browser or other cache
  • Work Experience:

  • Q&A Session: ask me anything; around the syllabus or anything else

  • Shameless plugs:

    • DevNQ - community run, all-invlusive group for IT developers (events, hackathon on Townsville Show weekend in July, socials)
    • Young ICT Explorers - yearly competition that students/schools can enter and win prizes
    • TCC Big Ideas Youth Challenge - 22 April 2021, one day event around innovation, entrepreneurship and change. Also a PD session held on the day prior for teachers.