Struct orca::App [] [src]

pub struct App { /* fields omitted */ }

A reddit object

Usage:

To create a new instance, use Reddit::new()

Methods

impl App
[src]

Create a new reddit instance

Arguments

  • appname - Unique app name
  • appversion - App version
  • appauthor - Auther of the app # Returns A new reddit object

Return an Auth object for use with API calls that require a user account to work

Arguments

  • username - Username of the user to be authorized as
  • password - Password of the user to be authorized as
  • oauth - Oauth app type # Returns A result containing either an Auth object or a certain error To use place it in the auth field of a connection struct

Get the posts in a subreddit sorted in a specific way

Arguments

  • sub - Name of subreddit to query
  • sort - Sort method of query # Returns A result containing a json listing of posts

Submit a self post

Arguments

  • sub - Name of the subreddit to submit a post to
  • title - Title of the post
  • text - Body of the post # Returns A result with reddit's json response to the submission

Get info of the user currently authorized

Note: requires connection to be authorized

Returns

A result with the json value of the user data

Get a iterator of all comments in order of being posted

Arguments

  • sub - Name of the subreddit to pull comments from. Can be 'all' to pull from all of reddit