2 Star 0 Fork 0

mirrors_gitpan / OpenGbg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
NAME
    OpenGbg - An interface to the Open Data API of Gothenburg

SYNOPSIS
        use OpenGbg;

        my $opengbg = OpenGbg->new(key => 'secret-api-key');

        $response = $opengbg->styr_och_stall->get_bike_stations;

        print $response->stations->get_by_index(0)->to_text;

DESCRIPTION
    OpenGbg is a way to connect to and use the open data published by the
    city of Gothenburg <https://en.wikipedia.org/wiki/Gothenburg>.

    The open data homepage is located at <http://data.goteborg.se/>. All
    official documentation is in Swedish, but the license agreement is
    published in English here <https://gbgdata.wordpress.com/goopen/>.

    To use the API you need to get a free api key.

METHOD
  new()
    Takes an optional key-value pair, the key is "key" and the value your
    api key, see authenticate.

    Returns a OpenGbg::Handler object on which you then call the services.

AUTHENTICATE
    Once you have your api key you can use it in two different ways:

    1. You can give it in the constructor:

        my $opengbg = OpenGbg->new(key => 'secret-api-key');

    2. You can save it in a file named ".opengbg.ini" in your homedir:

        [API]
        key = secret-api-key

SERVICES
    The following services are currently implemented in this distribution:

    AirQuality - Data on air quality

    Bridge - Data on the openness of Göta Älvbron

    StyrOchStall - Data on rent-a-bike stations

    TrafficCamera - Data on traffic cameras, and their images

NAMING
    Most names related to the services are de-camelized, while others are
    lower-cased (no underscores). For example, the service 'GetBikeStations'
    is called like this:

        my $gbg = OpenGbg->new;
        my $stations = $gbg->get_bike_stations;

    All calls to services are prefixed with 'get' even if the service isn't
    named that way. On the other hand, the 'service' suffix on some services
    are removed.

    Date/time intervals are always called 'start' and 'end' (in the web
    services they are sometimes called 'start' and 'stop').

BUGS & ISSUES
    The repository and issue tracker is at:
    <https://github.com/Csson/p5-OpenGbg>

DISCLAIMER
    This is not an official distribution.

AUTHOR
    Erik Carlsson <info@code301.com>

COPYRIGHT
    Copyright 2014 - Erik Carlsson

LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

空文件

简介

暂无描述 展开 收起
Perl 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors_gitpan/OpenGbg.git
git@gitee.com:mirrors_gitpan/OpenGbg.git
mirrors_gitpan
OpenGbg
OpenGbg
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891