wiki-api
Version, currently master branch1 version
- master branchlatestFeb 17, 2020
github.com/konstantine-v/CrWikiLib
WIP - Wrapper for Wikipedia API for use in Crystal
Installation
# Add this to your shard.yml
dependencies:
wiki-api:
github: konstantine-v/CrWikiLib
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.32.1- License
- MIT
- Author
- Konstantine
- Target
wiki-apifrom src/wiki-api.cr
Dependencies
This version declares no dependencies.
README
Wiki::Library
Currently WIP, but this project works.
I wrapper for the Wikipedia and Wikimedia API to get commonly used things.
It's constantly changing, but my main focus is working on new features and making QOL changes to make it nicer to work with.
Installation
Install as a shard by including in your shards.yml
dependencies:
crwikilib:
github: MaterialFuture/CrWikiLib
After adding remember to run shards to install and be able to use in your project
Usage
Refer to examples/ directory for examples of use.
To get the page in a data format use the following:
puts Wiki::Page.new("https", "Crystal_(programming_language)", "json")
To get the page as a PDF for download use the following:
puts Wiki::Page.pdf("https", "Crystal_(programming_language)")
To get the Post of the Day use the following code: (date in ISO format)
Wiki::POTD.new("HTTPS", potd_date, "json")
I made it so you can specify protocol, that way if you're not required HTTP or HTTPS, you dsecide.
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/materialfuture/wiki-api/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- MaterialFuture - creator and maintainer
Notes
- Example PDF Request to Rest API: https://en.wikipedia.org/api/rest_v1/page/pdf/Rust_(programming_language)
TODO
- Look into adding Admiral Shard
- Look into adding functionality for reading txt file for bulk downloads for PDFs
- Breakout URLs for so they're more reusable
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 17, 2020
- Crystal
0.32.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/konstantine-v/CrWikiLib
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1