Download the PHP package tschucki/laravel-pr0gramm-api without Composer
On this page you can find all versions of the php package tschucki/laravel-pr0gramm-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tschucki/laravel-pr0gramm-api
More information about tschucki/laravel-pr0gramm-api
Files in tschucki/laravel-pr0gramm-api
Package laravel-pr0gramm-api
Short Description Use Pr0gramm API
License MIT
Homepage https://github.com/tschucki/laravel-pr0gramm-api
Informations about the package laravel-pr0gramm-api
Laravel Pr0gramm API
This package provides a Laravel wrapper for the Pr0gramm API by Pr0gramm. This package is not affiliated with Pr0gramm. I created it for my own use on other projects.
I will try to keep this package up to date with the API and imporve it over time. If you find any bugs or have any suggestions, feel free to open an issue or a PR.
Installation
You can install the package via composer:
You don't need to publish any config files. The package will work out of the box. You just have to log in to Pr0gramm, to get some user related request. (For example conversations or votings)
But if you want to provide your pr0gramm cookie, you can add this to your services.php
.
Usage
It is recommended to use the facade Pr0grammApi
to access the API.
You can access all endpoints of the API:
- User
- Post
- Tag
- Comment
- Contact
- Inbox
- Profile
Login to your account
To log in to your account, you can use the login
method.
It will create a new Session and stores the cookie for you.
Afterwards you don't need to provide the cookie on every request.
When using a non-bot account, you have to provide a captcha and token parameter (You can get the captcha and token via Pr0grammApi::Captcha
).
You can ignore this, when you already provided the cookie in your services.php
. You can copy your Cookie from the Dev-Tools, while logged in for example.
Logout of your account
Logging out will delete the session and the cookie. You have to log in again, to access user related endpoints. Otherwise, you will get an Exception.
Examples
Retrieving the current user
Retrieving info about a user
Voting a post
Add a comment
Get Comments from Inbox
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Feel free to open a PR or an issue. I will try to respond as soon as possible.
Credits
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-pr0gramm-api with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^10.0|^11.0