Download the PHP package rikudou/lemmy-api without Composer

On this page you can find all versions of the php package rikudou/lemmy-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lemmy-api

Lemmy API

Lemmy is all the rage now! This package allows you to communicate with Lemmy from PHP which opens up great possibilities for writing bots!

All methods are fully typed so your IDE should help you a lot.

Note that this is an alpha version and while everything should work, the public api will probably change as I find better names and/or locations for various methods.

Installation

Requires PHP 8.2.

composer require rikudou/lemmy-api

You also need to install a compatible PSR http client and PSR http request factory:

composer require rikudou/lemmy-api guzzlehttp/guzzle

or

composer require rikudou/lemmy-api symfony/http-client nyholm/psr7

or any other implementation you like.

Usage

Notes

There are many, many api methods, most of them have no documentation in the upstream so I tried my best to guess at what they do and tried to sort them into different classes, I'm not entirely sure if I managed to do so correctly.

Due to the same reason it would also be hard to list them all and provide documentation, it would easily take me more time than writing the code. If someone feels up to the task, I'll gladly accept PRs with documentation!

To get you started at least a little, check the various interfaces to see the names and arguments of methods:

Currently even api calls that don't need a logged in user require login in this package, meaning this package doesn't allow anonymous access at all. This will be looked into in the future.

There are no tests currently, I plan them in the future but now I don't want to see anything Lemmy api related for a while.

Example

A very primitive remind me bot:


All versions of lemmy-api with dependencies

PHP Build Version
Package Version
Requires psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-factory-implementation Version *
psr/http-client-implementation Version *
php Version ^8.2
ext-json Version *
psr/http-message Version ^1.0 | ^2.0
ext-fileinfo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rikudou/lemmy-api contains the following files

Loading the files please wait ....