Skip to content

jrm2k6/laradit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Installation

composer require jrm2k6/laradit

Configuration

Add in config/app.php:

 'providers' => [
    JD\Laradit\LaraditAuthenticationServiceProvider::class,
    JD\Laradit\LaraditResourceServiceProvider::class,
  ]

Add in your .env file:

LARADIT_CLIENT_ID=your-client-id
LARADIT_CLIENT_SECRET=yout-client-secret
LARADIT_OAUTH_REDIRECT_URI=your-callback
LARADIT_REDDIT_USERNAME=your-username
LARADIT_REDDIT_PASSWORD=your-password
LARADIT_USER_AGENT=your-user-agent

Usage

To get a authentication token for script apps:

LaraditAuth::getScriptAuthenticationManager()->getAccessToken();

You can then set the token:

 Laradit::setAuthToken($authToken);

About

Reddit API Wrapper for Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages