Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NASA Mars Rover Photos API PHP Wrapper

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: