All Projects → larsha → bolaget.io

larsha / bolaget.io

Licence: MIT license
RESTful(ish) JSON API for Swedish alcohol monopoly, Systembolaget. Running on preemptibles on k8s! 🚀✨🍺

Programming Languages

javascript
184084 projects - #8 most used programming language
Handlebars
879 projects

Projects that are alternatives of or similar to bolaget.io

xijs
A business - oriented scene Js Library
Stars: ✭ 91 (+237.04%)
Mutual labels:  json-api
Characters of the Three Kingdoms
3️⃣ Characters of the Three Kingdoms - 三国人物结构化数据
Stars: ✭ 100 (+270.37%)
Mutual labels:  json-api
jsonapi
(Official) Saferpay JSON API documentation, help and examples.
Stars: ✭ 22 (-18.52%)
Mutual labels:  json-api
JsonApiBundle
Integration of JSON API with Symfony using JMS Serializer
Stars: ✭ 56 (+107.41%)
Mutual labels:  json-api
fire
An idiomatic micro-framework for building Ember.js compatible APIs with Go.
Stars: ✭ 56 (+107.41%)
Mutual labels:  json-api
json-api-response-converter
Normalize your JSON:API response
Stars: ✭ 21 (-22.22%)
Mutual labels:  json-api
fn
No description or website provided.
Stars: ✭ 28 (+3.7%)
Mutual labels:  json-api
rjsonapi
⛔ ARCHIVED ⛔ Consumer for APIs that Follow the JSON API Specification
Stars: ✭ 29 (+7.41%)
Mutual labels:  json-api
GetJSON
GetJson is the simplest HTTP library to Receive JSON Data from REST Service.
Stars: ✭ 18 (-33.33%)
Mutual labels:  json-api
BarterOnly
An ecommerce platform to buy or exchange items at your convenience
Stars: ✭ 16 (-40.74%)
Mutual labels:  json-api
jsonapi-serializable
Conveniently build and efficiently render JSON API resources.
Stars: ✭ 43 (+59.26%)
Mutual labels:  json-api
ck-analytics
Collective Knowledge repository with actions to unify the access to different predictive analytics engines (scipy, R, DNN) from software, command line and web-services via CK JSON API:
Stars: ✭ 35 (+29.63%)
Mutual labels:  json-api
json-api-react-redux-example
React Application With Redux And JSON API
Stars: ✭ 25 (-7.41%)
Mutual labels:  json-api
php-serializer
Serialize PHP variables, including objects, in any format. Support to unserialize it too.
Stars: ✭ 47 (+74.07%)
Mutual labels:  json-api
FSharp.JsonApi
Use F# to create and consume flexible, strongly typed web APIs following the JSON:API specification
Stars: ✭ 20 (-25.93%)
Mutual labels:  json-api
drupal-jsonapi-params
A package to manage json-api params
Stars: ✭ 42 (+55.56%)
Mutual labels:  json-api
example-golang-todo
Golang API backend powering a TodoList app
Stars: ✭ 33 (+22.22%)
Mutual labels:  json-api
go-json-spec-handler
Simple JSON API Spec Compatibility in Golang
Stars: ✭ 41 (+51.85%)
Mutual labels:  json-api
QuickLearn
A collection of resources categorised by tech domains, languages, expertise and much more. QuickLearn gives you a quick access to all the resources that you could need at a single place, within a click!
Stars: ✭ 89 (+229.63%)
Mutual labels:  json-api
ck-crowd-scenarios
Public scenarios to crowdsource experiments (such as DNN crowd-benchmarking and crowd-tuning) using Collective Knowledge Framework across diverse mobile devices provided by volunteers. Results are continuously aggregated at the open repository of knowledge:
Stars: ✭ 22 (-18.52%)
Mutual labels:  json-api

bolaget.io (https://bolaget.io)

Please read this

Systembolaget will remove the information about all the products from their API starting 1st of November. They have also removed the API we used for bolaget.io. This means that bolaget.io no longer can fetch new product updates and is deprecated and now also removed. https://api-portal.systembolaget.se/api-update-blog/changes-in-the-api-portal


CI Actions Status

This API has nothing to do with Systembolaget, this app consumes a large XML API from Systembolaget and transforms it into a REST JSON API. More info can be found here: http://www.systembolaget.se/api

Flowchart

Flowchart

Versions

Please have a look at CHANGELOG.md for more information. Otherwise this project adheres to Semantic Versioning.

Version Url
v1 https://bolaget.io/v1

All resources will be available without versioning in the url and be an alias for the latest API version.

Products

GET /products
Host: bolaget.io
  • URL Params

    Optional:

    limit=[number] - Default limit is 10, max limit is 100

    offset=[number]

    ecological=[bool]

    koscher=[bool]

    ethical=[bool]

    year_from=[number]

    year_to=[number]

    sales_start_from=[date] - YYYY-MM-DD

    sales_start_to=[date] - YYYY-MM-DD

    price_from=[number]

    price_to=[integer]

    volume_from=[integer]

    volume_to=[number]

    assortment=[alphanumeric] - BS = Reservation assortment, TSE = Temporary assortment, FS = Regular assortment and FSN = Regular assortment (new product), TSLS = Locally produced

    assortment_text=[alphanumeric] - Ordervaror = BS, Fast sortiment = FS, Tillfälligt sortiment = TSE, Fast sortiment = FS/FSE, Lokalt & Småskaligt = TSLS

    sort=[alphanumeric] - Property to sort by, accepting:

    • price:asc|desc
    • price_per_liter:asc|desc
    • volume_in_milliliter:asc|desc
    • sales_start:asc|desc
    • year:asc|desc
    • zip_code:asc|desc
    • name:asc|desc

    name|type|style|provider|producer|origin|origin_country|packaging|product_group|sealing|commodities=[alphanumeric] - Fuzzy match

    search=[alphanumeric] - Fuzzy search in several fields

  • Response headers:

    X-Total-Count=[number] - Total count of products based on filtering used for pagination

  • Success Response:

    • Code: 200
      Content: [{ name: '117 Grythyttan' ... }] or []
  • Error Response:

    • Code: 500 INTERNAL SERVER ERROR
      Content: { error : "Ouch, an ugly error has occured!" }

Product

GET /products/:nr
GET /products/:article_nr
Host: bolaget.io
  • Success Response:

    • Code: 200
      Content: { nr: 12, name: "117 Grythyttan" ... }
  • Error Response:

    • Code: 500 INTERNAL SERVER ERROR
      Content: { error : "Ouch, an ugly error has occured!" }

    OR

    • Code: 404 NOT FOUND
      Content: { error : "Move along, nothing to see here!" }

Stores

GET /stores
Host: bolaget.io
  • URL Params

    Optional:

    limit=[number] - Default limit is 10, max limit is 100

    offset=[number]

    labels=[alphanumeric] - Takes a comma separated list, eg. norrbotten,jämtland, returns documents containing all labels matched (fuzzy)

    sort=[alphanumeric] - Property to sort by, accepting:

    • RT90x:asc|desc
    • RT90y:asc|desc
    • address:asc|desc
    • city:asc|desc
    • county:asc|desc

    type|name|city|county|address=[alphanumeric] - Fuzzy match

    search=[alphanumeric] - Fuzzy search in several fields

  • Response headers:

    X-Total-Count=[number] - Total count of stores based on filtering used for pagination

  • Success Response:

    • Code: 200
      Content: [{ adress_1: 'Kungsholmstorg 11 A' ... }] or []
  • Error Response:

    • Code: 500 Internal Server Error
      Content: { error : "Ouch, an ugly error has occured!" }

Store

GET /stores/:nr
Host: bolaget.io
  • Success Response:

    • Code: 200
      Content: { address: "Vasagatan 25", ... }
  • Error Response:

    • Code: 500 INTERNAL SERVER ERROR
      Content: { error : "Ouch, an ugly error has occured!" }

    OR

    • Code: 404 NOT FOUND
      Content: { error : "Move along, nothing to see here!" }

Development environment

Kubernetes

You need a local Kubernetes cluster (minikube, docker-for-mac etc.) with helm installed.

Build:

make build

Install:

helm install \
  -f chart/values.yaml \
  -f chart/values-dev.yaml \
  --set web.image.tag=local \
  --set web.image.pullPolicy=Never \
  --name bolagetio \
  ./chart

Docker Compose

Using Docker and Docker Compose (https://www.docker.com/)

Build

  • docker-compose build

Start

  • docker-compose up web

Start worker

  • docker-compose run --rm web npm run dev:worker

Run tests

  • docker-compose run --rm web npm test
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].