Download the PHP package hamhamfonfon/astrobin-ws without Composer

On this page you can find all versions of the php package hamhamfonfon/astrobin-ws. 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 astrobin-ws

Total Downloads License CI Status codecov.io

WebServices for Astrobin's API REST

Table of contents

Version 2.6.2

Requirements

Introduction

Astrobin's WebServices is a PHP library for request Astrobin's API Rest and get amazing astrophotographies hosted on Astrobin. Please read API section in "Terms of service"

Installing

You can install this package in 2 different ways.

composer require hamhamfonfon/astrobin-ws

Update to the newest version :

composer update hamhamfonfon/astrobin-ws

If you're using old PHP versions:

Caution, these versions are not maintained anymore. Only 2.6.* will be maintained and will have new features.

git clone [email protected]:HamHamFonFon/Astrobin-Webservices.git

Usage

First, set your keys in .env file :

Example without framework:

Example with Symfony:

WebServices

The library expose 3 WebServices, each with these methods below.

GetImage :

Function name Parameter Response
getById() $id Image
getImageById() $id Image
getImagesBySubject() $subjectId $limit ListImage,Image
getImagesByTitle() $title $limit ListImage,Image
getImagesByDescription() $description $limit ListImage,Image
getImagesByUser() $userName $limit ListImage,Image
getImagesByRangeDate() $dateFromStr (ex: 2018-04-01), $dateToStr (2018-04-31 or null) ListImage,Image
getImageBy() $filters $limit ListImage,Image

getImageById() is an alias of getById() for version 1.0.0. retro-compatibility.

List of filters that can be used in getImageBy() :

Filter name Comment
subjects Used in getImagesBySubject() method, search by subject
user Used in getImagesByUser() method, search by username
title__icontains Used in getImagesByTitle() method, search by case-insensitive, partial title
description__icontains Used in getImagesByDescription() method, search by case-insensitive, partial description
__startswith
__endswith
__contains
__istartswith
__iendswith

GetTodayImage :

Function name Parameter Response
getDayImage() $offset , limit = 1 ListToday
getTodayImage() Today

GetCollection :

Function name Parameter Response
getById() $id Collection
DEPRECATED getCollectionByUser() $user,$limit ListCollection

Parameter $limit is mandatory and must be an integer.

GetUser

Function name Parameter Response
getById() $id User
getByUername() $username User

/!\ For all webservices, parameter $id must be a string and not an integer or float.

Responses

Image

Parameter Description
title Title of image
subjects Keywords
description Description
url_gallery URL of image for gallery
url_thumb URL of image , thumb size
url_regular URL of image
user Username
url_histogram URL to histogram
url_skyplot URL to skyplot
url_solution
url_advanced_skyplot_small URL to advanced skyplot
views Count of views
likes Count of likes

ListImage

Parameter Description
listImages List of images

Collection

Parameter Description
id Identifier
name Name of collection
description Description
user User name
date_created Date of creation
date_updated Date of modification
images Path of WS Image

ListCollection

Parameter Description
listCollection List of collection with list of images

Today

Parameter Description
date Date of image (Y-m-d format)
image instance of Image::class as today
resource_uri URI of today image

User

Parameter Description
id
username
avatar
about
image_count
job
hobbies
language
website

Contributes

I accept contributions, please fork the project and submit pull requests.

Bugs and issues

In case you find some bugs or have question about Astrobin-WebServices, open an issue and I will answer you as soon as possible.

Install package for debugging

Retrieve code-source

Clone repository from GitHub

Run docker

Build, compile and up docker container

Installation

Install dependencies

Run Rector

Run PHP CodeSnifer

Apply PHPCBF (fix and beautify PHPCS errors):

Authors

Stéphane Méaudre - [email protected] - 2023

Licence

This project is licensed under the MIT License - see the LICENSE.md file for details

Other versions


All versions of astrobin-ws with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.0
guzzlehttp/guzzle Version ^7.5
ext-ctype Version *
ext-json 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 hamhamfonfon/astrobin-ws contains the following files

Loading the files please wait ....