1 个不稳定版本
0.1.0 | 2019年2月24日 |
---|
#292 in #open-api
16KB
148 行
Oslobike,Oslo城市自行车开放API的Rust包装器
构建
要构建项目,请确保已安装最新的Rust开发环境。最简单的方法是通过rustup安装工具链。
rustup install stable
构建和运行此程序至少需要Rust v1.32。
您还需要一个API密钥,您可以在以下位置获取:https://developer.oslobysykkel.no/api
要运行程序,请执行
OSLOBIKE_APIKEY=<your api key> cargo run
您还可以将API密钥保存在项目根目录下的.env
文件中,程序将自动获取它。
echo OSLOBIKE_APIKEY=<your api key> > .env
cargo run
构建文档
cargo doc --lib
测试文档
cargo test
构建项目的发布版本
cargo build --release
二进制文件位于./target/release/oslobike
。
许可证
Copyright (C) 2019 Harald Eilertsen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
依赖项
~24MB
~502K SLoC