All Projects → KirkBushman → ARAW

KirkBushman / ARAW

Licence: MIT license
The Android Reddit API Wrapper

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to ARAW

rreddit
𝐫⟋ Get Reddit data
Stars: ✭ 49 (-34.67%)
Mutual labels:  reddit, reddit-api
Mongit
💾 Mongo-esque Reddit-based Database!
Stars: ✭ 20 (-73.33%)
Mutual labels:  reddit, reddit-api
Unim.press
A Reddit front-page reader in the style of The New York Times.
Stars: ✭ 199 (+165.33%)
Mutual labels:  reddit, reddit-api
redditwatcher
📻 Reddit streaming CLI
Stars: ✭ 17 (-77.33%)
Mutual labels:  reddit, reddit-api
roux
Simple and (a)synchronous Reddit API wrapper for Rust.
Stars: ✭ 41 (-45.33%)
Mutual labels:  reddit, reddit-api
Reddit Bot
🤖 Making a Reddit Bot using Python, Heroku and Heroku Postgres.
Stars: ✭ 99 (+32%)
Mutual labels:  reddit, reddit-api
cronnit.com
A free tool for scheduling posts to Reddit.
Stars: ✭ 3 (-96%)
Mutual labels:  reddit, reddit-api
Redditbot
Discord bot for reddit.com
Stars: ✭ 17 (-77.33%)
Mutual labels:  reddit, reddit-api
reddit-image-fetcher
A JavaScript package for fetching reddit images, memes, wallpapers and more.
Stars: ✭ 40 (-46.67%)
Mutual labels:  reddit, reddit-api
node-express-reddit-clone
Build a Node, Express and MySQL-based clone of Reddit for DecodeMTL web development bootcamp
Stars: ✭ 28 (-62.67%)
Mutual labels:  reddit, reddit-api
Reddsaver
CLI tool to download saved and upvoted media from Reddit
Stars: ✭ 76 (+1.33%)
Mutual labels:  reddit, reddit-api
aPRAW
Asynchronous Python Reddit API Wrapper
Stars: ✭ 49 (-34.67%)
Mutual labels:  reddit, reddit-api
Psraw
PowerShell Reddit API Wrapper
Stars: ✭ 42 (-44%)
Mutual labels:  reddit, reddit-api
Mvvm Reddit
A companion project for our blog post on better Android software development using MVVM with RxJava.
Stars: ✭ 106 (+41.33%)
Mutual labels:  reddit, reddit-api
Snoo
A Reddit command line client written in Node.js, using modern ES-features
Stars: ✭ 39 (-48%)
Mutual labels:  reddit, reddit-api
Praw
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.
Stars: ✭ 2,675 (+3466.67%)
Mutual labels:  reddit, reddit-api
Social Amnesia
Forget the past. Social Amnesia makes sure your social media accounts only show your posts from recent history, not from "that phase" 5 years ago.
Stars: ✭ 656 (+774.67%)
Mutual labels:  reddit, reddit-api
Shreddit
Remove your comment history on Reddit as deleting an account does not do so.
Stars: ✭ 669 (+792%)
Mutual labels:  reddit, reddit-api
crypto-subreddits-cli
👽 Track Cryptocurrency Subreddits On The Command Line 👽
Stars: ✭ 24 (-68%)
Mutual labels:  reddit, reddit-api
saveddit
Bulk Downloader for Reddit
Stars: ✭ 130 (+73.33%)
Mutual labels:  reddit, reddit-api

ARAW

The Android Reddit API Wrapper

Info

ARAW is a reddit API Wrapper that target the android platform specifically. It is built with Kotlin, Retrofit, Moshi, OkHttp.

ARAW it's hosted on Jitpack

Documentation

You can find the Docs at: https://kirkbushman.github.io/ARAW/

Requirements

ARAW requires Java 11, you can upgrade your project like this:

android {

    /* ... */
    
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }

    kotlinOptions {
        jvmTarget = '11'
    }
}

How to install.

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.KirkBushman:ARAW:Tag'
}

Obtain a userless client

// step 1 - create the helper
val helper = AuthUserlessHelper(
    context = this,
    clientId = "**CLIENT ID STRING**",
    deviceId = "**DEVICE ID**", // set as null to use the default android UUID
    scopes = creds.scopes.toTypedArray(), // array of scopes strings
    logging = true
)

// use shouldLogin() to check whether authentication already happened
if (!helper.shouldLogin()) {
    // use saved one
} else {
    // you must authenticate
}

// step 2 - obtain a client 
val client = helper.getRedditClient()

Obtain an installed app client

// step 1 - crete the help
val helper = AuthAppHelper(
    context = this,
    clientId = "**CLIENT ID STRING**",
    redirectUrl = "**REDIRECT URL**",
    scopes = creds.scopes.toTypedArray(), // array of scopes strings
    logging = true
)

// use shouldLogin() to check whether authentication already happened
if (!helper.shouldLogin()) {
    // use saved one
} else {
    // you must authenticate
}

// step 2 - obtain a client 
val client = helper.getRedditClient()

Use it to browse Reddit

// get the authed account (not possible in the userless auth)
val me = client.accoutsClient.me()
println(me.toString())

// get the saved posts 
val fetcher = client.accountsClient.saved()
val saved = fetcher.fetchNext() // get the first page
val saved2 = fetcher.fetchNext() // get the second page

println(saved.toString())
println(saved2.toString())

// get the submissions from a subreddit
val fetcher = client.contributionsClient.submissions("pics")
val submissions = fetcher.fetchNext()

println(submissions.toString())

// get inbox messages
val fetcher = client.messagesClient.inbox()
val messages = fetcher.fetchNext()

println(messages.toString())

// get redditor profile
val redditor = client.redditorsClient.redditor("Kirk-Bushman")

println(redditor.toString())

// upvote a submission
val submission: Submission = ...
client.contributionsClient.vote(Vote.UPVOTE, submission)

// get submissions from a multireddit
val fetcher = client.contributionsClient.multiredditSubmissions(listOf("pics", "design", "architecture"))
val submissions = fetcher.fetchNext()

println(submissions.toString())

Apps that are using ARAW:

Redditoria

Help improve this section, open an issue submitting your implementation.

License

This project is licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].