devidw/nasa-mars-rover-photo-api-wrapper

PHP Wrapper for NASA's Mars Rover Photos API

dev-master 2022-01-24 23:35 UTC

This package is auto-updated.

Last update: 2024-10-25 21:37:03 UTC


README

Installation

composer require devidw/nasa-mars-rover-photo-api-wrapper

Usage

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Devidw\MarsRoverPhoto\MarsRoverPhoto;

$mars = new MarsRoverPhoto(
    apiKey: 'DEMO_KEY',
    rover: 'curiosity',
);

$photos = $mars->sol(100)->camera('NAVCAM')->get();

var_dump($photos);

Methods

public MarsRoverPhoto::__construct ( string $apiKey , string $rover )

public MarsRoverPhoto::get ( ) : object

public MarsRoverPhoto::sol ( int $sol ) : MarsRoverPhoto

public MarsRoverPhoto::earthDate ( int $earthDate ) : MarsRoverPhoto

public MarsRoverPhoto::camera ( string $camera ) : MarsRoverPhoto

public MarsRoverPhoto::page ( int $page ) : MarsRoverPhoto

See

For more details on the API see: