spenserblack / github-stats-rs

A tool for using Github's API
Apache License 2.0
1 stars 5 forks source link

Prevent misuse of query #25

Open spenserblack opened 4 years ago

spenserblack commented 4 years ago

For example, it doesn't make sense to use label:Hacktoberfest when searching users. Perhaps Query should be a struct-like enum?

spenserblack commented 4 years ago

Since 09f85836d2a8b7de6f106594ef21b6a05ca516ef has been pushed, Search is now limited to certain fields. Not sure what the best way to implement this would be, but it should avoid redundant usage like

Search::issues(Query::issues()/* etc. */);
spenserblack commented 4 years ago

Perhaps usage like this?

Query::issues().is("pr").into_search().per_page(1);
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been closed for being stale.