NasaApi class

A class that interacts with NASA's API to fetch data related to the perseverance rover

Constructors

NasaApi()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

clearCache() → void
Clears the cached mission manifest data
getApiKey() Future<String>
Fetches the API key from SharedPreferences. If not present, returns the default API key
getMissionManifest() Future<Map<String, dynamic>>
Fetches the mission manifest for the perseverance rover from NASA's API using manifest endpoint
getPhotos(int sol) Future<Map<String, dynamic>>
Fetches photos for the specified sol (Martian day) from NASA's API using photos endpoint
isApiKeyValid(String apiKey) Future<bool>
Checks if the provided apiKey is valid by making a request to NASA's API
loadManifestData() Future<Map<String, dynamic>>
Loads the mission manifest data from cache or fetches it from NASA's API if not present in cache
storeManifestInCache(Map<String, dynamic> data) → void
Stores the data of the mission manifest in cache using SharedPreferences