在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Byron/google-apis-rs开源软件地址(OpenSource Url):https://github.com/Byron/google-apis-rs开源编程语言(OpenSource Language):Rust 99.9%开源软件介绍(OpenSource Introduction):This repository holds mako scripts to generate all Google APIs as described by the google discovery service. The generate source code of each google API can be found in the To find a library of your interest, you might want to proceed looking at the API documentation index. Maintenance ModeThese crates are considered done and only minimal time will be invested to keep them relevant. This includes the following tasks:
New features will not be implemented but PRs are welcome. Please feel free to start a discussion to talk about desired features. Please be aware of the alternative implementation of these crates, which may be better suited for you. Project Features
Build InstructionsPrerequisitesTo generate the APIs yourself, you will need to meet the following prerequisites:
Using MakeThe makefile is written to be self-documenting. Just calling ➜ google-apis-rs git:(main) make
using template engine: '.pyenv/bin/python etc/bin/mako-render'
Targets
help-api - show all api targets to build individually
help-cli - show all cli targets to build individually
docs-all - cargo-doc on all APIs and associates, assemble them together and generate index
docs-all-clean - remove the entire set of generated documentation
github-pages - invoke ghp-import on all documentation
regen-apis - clear out all generated apis, and regenerate them
license - regenerate the main license file
update-json - rediscover API schema json files and update api-list.yaml with latest versions
deps - generate a file to tell how to build libraries and programs
help - print this help
make: Nothing to be done for `help'. You can easily build the documentation index using The same goes for commandline programs, just ust Make and parallel job executionIn theory, you can run make with Nonetheless, once you have built all dependencies for all APIs once, you can safely run cargo in parallel, as it will not update it's index again. In other words: The first time, you run Adding new APIs and updating API schemasThe list of available APIs to generate is based on a query of the Google discovery API, and then baked into a make-compatible dependency file. That will represents a cache, and the only way to enforce a full update is to delete it and run make again. For example, to update all json files and possibly retrieve new API schemas, do as follows: # -j8 will allow 8 parallel schema downloads
rm -f .api.deps .cli.deps && FETCH_APIS=1 make update-json -j8 Setup API and CLI version numbersThe version numbers for the respective program types are setup in The following script would regenerate all higher-level programs (CLI), add the result to git and push it. $ make gen-all-cli
# Use the version you are comfortable with in the changelog - sometimes you only want to
# update one program type. Here we go with a multi-version, containing all version strings
# in one heading. It's just for the visuals, after all.
$ clog --setversion=api-v<api-version>
$ git add .
$ git commit -m "chore(versionup): added code for latest version"
$ git tag api-v<api-version> cli-v<cli-version> && git push --tags origin master Publish API to CargoBefore anything else happens, be sure we publish the latest APIs to cargo. # We want as many publishes to work as possible ... -k keeps going on error.
# sometimes uploads fail spuriously, and just need to be retried.
$ make publish-api publish-cli -k
# another attempt to do this should not do actual work
$ make publish-api publish-cli
# all clear ? Please proceed ... . The previous call will have created plenty of marker files, which need to be committed to the repository to prevent to attempt multiple publishes of the same version. git add .
git commit -m "chore(cargo): publish latest version to crates.io"
git push origin main Build Documentation and post it onto GitHubThe last step will update the documentation index to point to the latest program versions. For now we assume hosting on GitHub-Pages, but the compiled documentation directory can be hosted statically anywhere if required. # This will run rust-doc on all APIs, generate the index html file and run gh-import at the end.
# The latter might require user-input in case no credentials are setup.
$ make github-pages LicenseThe license of everything not explicitly under a different license are licensed as specified in LicenseLicensed under either of
at your option. ContributionUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. Archive of Development VideosAll work done on the project is based on github issues, not only to track progress and show what's going on, but to have a place to link screen-recordings to. Milestones are used to provide a bigger picture. Additionally, there is a development diary which serves as summary of major steps taken so far. As opposed to issue-screencasts, it is not made live, but is authored and narrated, which should make it more accessible. Click the image below to see the playlist with all project related content: Super-Entertaining VideosEach episode sums up one major step in project development:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论