Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ycd/ibb
⚡ A Go wrapper for the IBB (Istanbul Metropolitan Municipality) Open Data Portal
https://github.com/ycd/ibb
Last synced: 28 days ago
JSON representation
⚡ A Go wrapper for the IBB (Istanbul Metropolitan Municipality) Open Data Portal
- Host: GitHub
- URL: https://github.com/ycd/ibb
- Owner: ycd
- License: mit
- Created: 2020-12-19T19:57:10.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-21T08:58:38.000Z (almost 4 years ago)
- Last Synced: 2023-07-27T22:49:13.204Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ibb- A Go wrapper for the IBB (Istanbul Metropolitan Municipality) Open Data Portal
## ⚙️ Installation
```go
go get -u github.com/ycd/ibb
```Or install with go modules.
```go
import (
"github.com/ycd/ibb"
)
```## Available methods
```go
func (c *Client) IETTTicketPrices(ctx context.Context, year int) (*ibb.TicketPrices, error)
```IETTTicketPrices Contains the price information of the public transportation tickets used in Istanbul.
* Type
* Name
* Pricing---
```go
func (c *Client) RailSystemsTimeline(ctx context.Context) (*ibb.RailSystemsTimeline, error)
```RailSystemsTimeline contains data on the number of voyages of the rail system lines in Istanbul. The data are in daily, monthly and yearly formats.
* Year
* Period
* M1Hatti
* M2Hatti
* M3Hatti
* M4Hatti
* M5Hatti
* M6Hatti
* T1Hatti
* T3Hatti
* T4Hatti
* F1Hatti
* TF1Hatti
* TF2Hatti
---
```go
func (c *Client) DailyMaximumJourneyByRailSystem(ctx context.Context) (*ibb.RailSystemsDailyMaximumJourneys, error)
```
DailyMaximumJourneyByRailSystem contains the maximum number of daily trips using rail system lines in Istanbul. Metro Istanbul Inc. and MARMARAY maximum line-based daily trips are included.* HatAdi
* Year from 2004-2021
* IsletmeTuru---
```go
func (c *Client) IsparkParkingLots(ctx context.Context) (*ibb.ParkingLots, error)
```IsparkParkingLots contains information about:
* Park ID
* Park Name
* Location2 ID
* Location Code
* Location Name
* Park Type ID
* Park Type
* Park Capacity
* Hours of Operation
* Region ID
* Region
* Sub Area ID
* Sub Area
* District ID
* District
* Address
* Latitude / Longitude
* Polygon Data
* Latitude
* Longitude
* Monthly Subscription Fee
* Free Parking Time
* Timetable
* Park Continue Point---
```go
func (c *Client) MunicipalityPopulation2019(ctx context.Context) (*ibb.MunicipalityPopulation2019, error)
```MunicipalityPopulation2019 contains the data about the population based on municipality's on Istanbul in 2019.
* Municipality
* Population---
```go
func (c *Client) WasteAmounts(ctx context.Context) (*ibb.WasteAmount, error)
```WasteAmounts contains information on the amount of waste by district, year and type of waste (solid waste collection activities, Medical waste collection activities, mechanical sweeping activities to prevent pollution in the main arteries and squares)
---
```go
func (c *Client) IGDASSubscribers(ctx context.Context) (*ibb.IGDASSubscribers, error)
```IGDASSubscribers contains IGDAS (gas company) subscription numbers in the 39 districts of Istanbul.
* Ilce
* AboneSayisi---
```go
func (c *Client) DamOccupancyRates(ctx context.Context) (*DamOccupancy, error)
```DamOccupancyRates contains information on the daily and annual changes of the occupancy rates of dams in Istanbul.
## Example
```go
package mainimport (
"context"
"github.com/ycd/ibb"
)func main() {
// Initialize the client
ibb := ibb.NewClient()ctx := context.Background()
// Get information about ticket prices of 2020
ticketP2020, _ := ibb.IETTTicketPrices(ctx, 2020)
for _, v := range ticketP2020.Records {
fmt.Println(v)
}
// Get information about ISPARK's parking lots
ispark, _ := ibb.IsparkParkingLots(ctx)
for _,v := range ispark.Records {
fmt.Println(v)
}
}
```## Licence
Package is distributed under MIT Licence.