{"id":20078766,"url":"https://github.com/nasso/rs621","last_synced_at":"2025-05-05T22:33:00.225Z","repository":{"id":35017862,"uuid":"196435539","full_name":"nasso/rs621","owner":"nasso","description":"Rust crate for the E621 API","archived":false,"fork":false,"pushed_at":"2024-10-28T10:18:24.000Z","size":1123,"stargazers_count":10,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-28T13:41:31.005Z","etag":null,"topics":["api","e621","e926","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nasso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-11T17:07:59.000Z","updated_at":"2024-10-28T10:18:29.000Z","dependencies_parsed_at":"2024-10-22T02:59:11.141Z","dependency_job_id":null,"html_url":"https://github.com/nasso/rs621","commit_stats":{"total_commits":94,"total_committers":4,"mean_commits":23.5,"dds":"0.14893617021276595","last_synced_commit":"1c74c8d36d8924a00bde06ade3f5829004ab24f1"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Frs621","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Frs621/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Frs621/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasso%2Frs621/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nasso","download_url":"https://codeload.github.com/nasso/rs621/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224470885,"owners_count":17316710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","e621","e926","rust"],"created_at":"2024-11-13T15:16:32.949Z","updated_at":"2024-11-13T15:16:33.649Z","avatar_url":"https://github.com/nasso.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rs621\n\n[![build](https://github.com/nasso/rs621/actions/workflows/rust.yml/badge.svg)](https://github.com/nasso/rs621/actions/workflows/rust.yml)\n[![Crates.io](https://img.shields.io/crates/v/rs621.svg)](https://crates.io/crates/rs621)\n[![Docs.rs](https://docs.rs/rs621/badge.svg)](https://docs.rs/rs621)\n\nRust bindings for the [e621.net](https://e926.net) API.\n\nE621 is a large online archive of furry (anthropomorphic) art. `rs621` provides\neasy-to-use bindings to its public HTTP API. It uses the `reqwest` crate to make\nHTTPs requests and exposes an asynchronous API.\n\n## Features\n\n- Highly asynchronous\n- Convenient stream-based API.\n- Post listing and searching, using any of the search options from the website.\n- Pool listing and searching.\n- Unlimited result count (automatically makes more requests in sequence to go\n  beyond the API limit of 320 posts per request).\n- Automatic rate-limit throttling.\n- Bulk-oriented API.\n\n## Usage\n\nNote: the API is highly asynchronous. If you're not familiar with those\nconcepts, check out\n[Asynchronous Programming in Rust](https://rust-lang.github.io/async-book/).\n\nFirst, create a [`Client`]. You'll need to provide the domain URL you'd like to\nuse, without the final slash (most likely [https://e926.net](https://e926.net)\nor its unsafe counterpart). You also have to provide a descriptive User-Agent\nfor your project. The official API encourages you to include your E621 username\nso that you may be contacted if your project causes problems.\n\n```rust\nlet client = Client::new(\"https://e926.net\", \"MyProject/1.0 (by username on e621)\")?;\n```\n\nYou can now use that client to make various operations, like a basic search,\nwith [`Client::post_search`]. The function returns a [`Stream`], which is like\nan asynchronous version of [`Iterator`].\n\n```rust\nuse futures::prelude::*;\n\nlet mut post_stream = client.post_search(\u0026[\"fluffy\", \"order:score\"][..]).take(20);\n\nwhile let Some(post) = post_stream.next().await {\n    println!(\"Post #{}\", post?.id);\n}\n```\n\nIf you have a list of post IDs:\n\n```rust\nlet mut post_stream = client.get_posts(\u0026[8595, 535, 2105, 1470]);\n\nwhile let Some(post) = post_stream.next().await {\n    println!(\"Post #{}\", post?.id);\n}\n```\n\nBest effort should be made to make as few API requests as possible. `rs621`\nhelps by providing bulk-oriented methods that take care of this for you. For\nexample, if you have 400 post IDs you'd like to fetch, a single call to\n[`Client::get_posts`] should be enough and WILL be faster. Do NOT call it\nrepeatedly in a loop.\n\n[`client`]: client/struct.Client.html\n[`client::post_search`]: client/struct.Client.html#method.post_search\n[`stream`]: https://docs.rs/futures/0.3.5/futures/stream/trait.Stream.html\n[`iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html\n[`client::get_posts`]: client/struct.Client.html#method.get_posts\n\n## Requirements\n\n`rs621` uses the `rust-openssl` crate. It has some requirements:\n\nOn Linux:\n\n- OpenSSL 1.0.1, 1.0.2, or 1.1.0 with headers (see\n  [rust-openssl](https://github.com/sfackler/rust-openssl)).\n\nOn Windows and macOS:\n\n- Nothing.\n\nSee [reqwest on crates.io](https://crates.io/crates/reqwest) for more details.\n\n## License\n\n`rs621` is licensed under the terms of both the MIT license and the Apache\nLicense (Version 2.0), at your choice.\n\nSee LICENSE-MIT and LICENSE-APACHE-2.0 files for the full texts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasso%2Frs621","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasso%2Frs621","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasso%2Frs621/lists"}