All Projects → Zetaphor → reddit-api-client

Zetaphor / reddit-api-client

Licence: other
A PHP client for the Reddit API

Programming Languages

PHP
23972 projects - #3 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to reddit-api-client

Redditkit.rb
[Deprecated] A Ruby wrapper for the reddit API
Stars: ✭ 156 (+110.81%)
Mutual labels:  reddit-api
MemePolice bot
This is a bot for r/PewdiepieSubmissions. Moderate harmful submissions by applying OCR on graphical content
Stars: ✭ 26 (-64.86%)
Mutual labels:  reddit-api
saveddit
Bulk Downloader for Reddit
Stars: ✭ 130 (+75.68%)
Mutual labels:  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 (+3514.86%)
Mutual labels:  reddit-api
reddit-image-fetcher
A JavaScript package for fetching reddit images, memes, wallpapers and more.
Stars: ✭ 40 (-45.95%)
Mutual labels:  reddit-api
bol-retailer-php-client
PHP Client library for Bol.com Retailer API
Stars: ✭ 19 (-74.32%)
Mutual labels:  php-client
Reddit Bot
🤖 Making a Reddit Bot using Python, Heroku and Heroku Postgres.
Stars: ✭ 99 (+33.78%)
Mutual labels:  reddit-api
deepl-php-lib
🧠 DeepL API Client Library supporting PHP >= 7.3
Stars: ✭ 50 (-32.43%)
Mutual labels:  php-client
Euro2016 TerminalApp
⚽ Instantly find 🏆EURO 2016 live-streams & highlights, now a Web App!
Stars: ✭ 54 (-27.03%)
Mutual labels:  reddit-api
roux
Simple and (a)synchronous Reddit API wrapper for Rust.
Stars: ✭ 41 (-44.59%)
Mutual labels:  reddit-api
picqer-php
PHP Client for the Picqer API
Stars: ✭ 16 (-78.38%)
Mutual labels:  php-client
node-express-reddit-clone
Build a Node, Express and MySQL-based clone of Reddit for DecodeMTL web development bootcamp
Stars: ✭ 28 (-62.16%)
Mutual labels:  reddit-api
DRAW
DRAW: The Dart Reddit API Wrapper
Stars: ✭ 82 (+10.81%)
Mutual labels:  reddit-api
Unim.press
A Reddit front-page reader in the style of The New York Times.
Stars: ✭ 199 (+168.92%)
Mutual labels:  reddit-api
aPRAW
Asynchronous Python Reddit API Wrapper
Stars: ✭ 49 (-33.78%)
Mutual labels:  reddit-api
Mvvm Reddit
A companion project for our blog post on better Android software development using MVVM with RxJava.
Stars: ✭ 106 (+43.24%)
Mutual labels:  reddit-api
rocketmq-client-php
A Php Client for Apache RocketMQ.
Stars: ✭ 80 (+8.11%)
Mutual labels:  php-client
fridaybot
Slack bot for https://spb-frontend.slack.com
Stars: ✭ 29 (-60.81%)
Mutual labels:  reddit-api
Easy-HotSpot
Easy HotSpot is a super easy WiFi hotspot user management utility for Mikrotik RouterOS based Router devices. Voucher printing in 6 ready made templates are available. Can be installed in any PHP/MySql enabled servers locally or in Internet web servers. Uses the PHP PEAR2 API Client by boenrobot.
Stars: ✭ 45 (-39.19%)
Mutual labels:  php-client
php-consul-api
PHP client implementation for the Consul API
Stars: ✭ 75 (+1.35%)
Mutual labels:  php-client

Reddit API Client

Build Status Latest Stable Version Latest Stable Version Minimum PHP Version

This is a PHP client for Reddit's API, built on the Guzzle web service client framework.

As a quick taster, here's some sample code:

<?php
require 'vendor/autoload.php';

$clientFactory = new Reddit\Api\Client\Factory;
$client = $clientFactory->createClient();

$login = $client->getCommand(
    'Login',
    array(
        'api_type' => 'json',
        'user'     => 'Example_User',
        'passwd'   => 'password123',
    )
);
$login->execute();

$submit = $client->getCommand(
    'Submit',
    array(
        'sr'    => 'programming',
        'kind'  => 'link',
        'title' => 'Mongo DB Is Web Scale',
        'url'   => 'http://www.youtube.com/watch?v=b2F-DItXtZs',
    )
);
$submit->execute();

Installation

This project is packaged with Composer. Add the following the the require section of your project's composer.json:

"zetaphor/reddit-api-client": "dev-master"

After that just run php composer.phar update and you're good to go! If you have any trouble, or want more detail, I've set up a working example "Reddit Console" project for reference purposes.

Development Status

Reddit's API is big, and the service description JSON in the ./api/ directory is incomplete.

Supported URIs

  • api/login/{user}
  • api/me.json
  • api/register
  • api/submit
  • api/del
  • api/vote
  • api/comment
  • api/message
  • by_id/t3_{id}.json
  • r/{subreddit}.json
  • user/{id}.json
  • user/{id}/about.json

The above list covers many of the most common interactions such as logging in, reading and posting links and comments, and casting votes. However, there are dozens more services available in Reddit's API, and simple pull requests adding entries to the service description JSON are very welcome.

Contributing

This is a fairly simple project so there aren't many guidelines. If you've fixed a bug or added a feature, let's get it merged back in. There are two hard rules.

1. Test-drive your changes

This project is test-driven. Please don't submit any code changes without a corresponding set of unit tests.

$ make phpunit

2. Follow PSR2

Stick to the PSR-2 standard.

$ make phpcs

License

This project is released 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].