Coder Social home page Coder Social logo

orca's People

Contributors

intrepidpig avatar lukabavdaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

orca's Issues

Move "integration tests" to test directory?

I believe the integration style tests you have in src/test.rs should go in tests/test.rs (or whatever file name you want) because they will then be classified as "integration tests" by cargo test. If you have them in the source directory for a specific reason, you can just close this issue, but it is good practice to keep these tests in the proper place for integration tests (although it shouldn't really change anything much)

Thanks!

maybe add `dev` branch and maintain stable `master`?

tried to point to this repo instead of the version on crates.io
screen shot 2018-02-06 at 5 06 41 am

probably not highest priority, but it would be cool if master could be relied on (could autodeploy dev changes to master if they compile/pass test suite)

-rust noob
so maybe there is just a flag i can add to ignore #![feature compilation problem
and generally very open to being wrong//ignored here :)

Release name on crates.io

Hi! I was wondering since this repo hasn't been updated in a couple of years, you'd be willing to release the name for use in crates.io. I have a project I've been working on for which I wish to use the name. Let me know! Thanks in advance.

No ratelimit headers are returned when making unauthorized requests

Reddit does not return the expected ratelimiting headers in the case when using an unauthorized client, in the form of:

fn main() {
    let mut app =
        App::new("someuseragent", "v0.1.0", "/u/username).expect("Failed to initialize client");

    let stream = app.create_comment_stream("all");
    for (i, comment) in stream.enumerate() {
        println!("{}. {}: {}\n", i, comment.author, comment.body);
    }
}

This can also be seen more easily in a browser, when attempting to retrieve something against a json-endpoint while logged out. Since the ratelimiting properties of Connection are then never set, this will cause the small program above to contentiously attempt to fetch posts with no ratelimiting whatsoever. There really doesn't seem to be much useful at all included in the response, so I'm guessing ratelimiting would have to be timer-based or similar.

last example in readme doesn't seem right

concerning: Example: Authorizing as OAuth Script type

after a bit of fussing I managed to get the following to work:

use orca::App;
use orca::net::auth::OAuthApp; 
fn main () {
    let mut reddit = App::new(name, version, author).unwrap();
    reddit.authorize(OAuthApp::Script {
    	id: app_id,
    	secret: app_secret, 
    	username: username,
    	password: password
    }).unwrap();
    println!("{:?}", reddit.get_self());
}
  • is first line in example code supposed to instead be let mut reddit instead of the current let mut app? (this one i think is at least straightforward)
  • not sure what the deal is with the fields (id:, secret:, username:) having to be named, might just be me and the weird way I'm accessing it.

Add timestamp file to comment

It would be quite useful to have a timestamp in the comment struct which represents a timestamp when the comment was created. Currently there is no information about when the comment was posted.

Implement more API functionality

This issue will track what is implemented and what needs to be implemented.

Account

  • /api/v1/me (needs dedicated data strucutre)
  • /api/v1/me/blocked
  • /api/v1/me/friends
  • /api/v1/me/karma
  • /api/v1/me/prefs
  • /api/v1/me/trophies
  • /prefs/blocked
  • /prefs/friends
  • /prefs/messaging
  • /prefs/trusted
  • /prefs/where

Captcha

  • /api/needs_captcha

Flair

  • /api/clearflairtemplates
  • /api/deleteflair
  • /api/deleteflairtemplate
  • /api/flair
  • /api/flair_template_order
  • /api/flairconfig
  • /api/flaircsv
  • /api/flairlist
  • /api/flairselector
  • /api/flairtemplate
  • /api/flairtemplate_v2
  • /api/link_flair
  • /api/link_flair_v2
  • /api/selectflair
  • /api/setflairenabled
  • /api/user_flair
  • /api/user_flair_v2

Reddit Gold

  • /api/v1/gold/gild/fullname
  • /api/v1/gold/give/username

Links & Comments

  • /api/comment
  • /api/del
  • /api/editusertext
  • /api/hide
  • /api/info
  • /api/lock
  • /api/marknsfw
  • /api/morechildren
  • /api/report
  • /api/save
  • /api/saved_categories
  • /api/sendreplies
  • /api/set_contest_mode
  • /api/set_subreddit_sticky
  • /api/set_suggested_sort
  • /api/spoiler
  • /api/store_visits
  • /api/submit (just self)
  • /api/unhide
  • /api/unklock
  • /api/unmarknsfw
  • /api/unsave
  • /api/unspoiler
  • /api/vote

Listings

  • /api/trending_subreddits
  • /best
  • /by_id/names (just one at a time)
  • /comments/article
  • /controversial
  • /duplicates/article
  • /hot
  • /new
  • /random
  • /rising
  • /top
  • /sort

Live Threads

  • (Any)

Private Messages

  • /api/block
  • /api/collapse_message
  • /api/compose
  • /api/del_msg
  • /api/read_all_messages
  • /api/unblock_subreddit
  • /api/uncollapse_message
  • /api/unread_message
  • /message/inbox
  • /message/sent
  • /message/unread
  • /message/where

Misc

  • /api/v1/scopes

Moderations

  • (Any)

New Modmail

  • (Any)

Multis

  • (Any)

Search

  • /search

Subreddits

  • /about/banned
  • /about/contributors
  • /about/moderators
  • /about/muted
  • /about/wikibanned
  • /about/wikicontributors
  • /about/where
  • /api/delete_sr_banner
  • /api/delete_sr_icon
  • /api/delete_sr_img
  • /api/recommend/sr/srnames
  • /api/search_reddit_names
  • /api/search_subreddits
  • /api/site_admin
  • /api/submit_text
  • /api/subreddit_autocomplete
  • /api/subreddit_autocomplete_v2
  • /api/subreddit_stylesheet
  • /api/subreddits_by_topic
  • /api/subscribe
  • /api/upload_sr_img
  • /r/subreddit/about
  • /r/subreddit/about/*
  • /sidebar
  • /sticky
  • /subreddits/*
  • /users/*

Users

  • /api/block_user
  • /api/friend
  • /api/report_user
  • /api/setpermissions
  • /api/unfriend
  • /api/user_data_by_account_ids
  • /api/username_available
  • /user/username/about
  • /user/username/comments
  • /user/username/downvoted
  • /user/username/gilded
  • /user/username/hidden
  • /user/username/overview
  • /user/username/saved
  • /user/username/submitted
  • /user/username/upvoted
  • /user/username/where

Wiki

  • (Any)

Holy cow

Automatically refresh tokens

Right now if a client is left running long enough for their token to expire, the application will panic when it attempts to refresh it. The function that needs the work done is net::auth::OAuth::refresh.

This functionality will need to be tested, which will be somewhat difficult since tokens expire in about 1 hour if I remember correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.