Skip to content

Feature3/opie10#87

Open
opie10 wants to merge 10 commits intoLEAGUE-Level6:developmentfrom
opie10:feature3/opie10
Open

Feature3/opie10#87
opie10 wants to merge 10 commits intoLEAGUE-Level6:developmentfrom
opie10:feature3/opie10

Conversation

@opie10
Copy link

@opie10 opie10 commented Aug 20, 2025

This feature accesses the NASA Astronomy Photo Of the Day API (APOD), and provides a quite pretty image of space/astronomy related things. Use the command !SpacePic to call this feature. Additionally, you can have additional information about the photo if you respond when prompted. 100% coverage on the main class, 66% coverage on the POJO handler (I'm not sure if that needs 100%/ how to get it there).

opie10 added 10 commits June 16, 2025 16:58
…I, issue appears when sending them. created embed with no errors, but no images actually appear? make sure sizes are right?
…e to get it to work, but should be nice still. Can't get image to properly embed at all.
…that the data gets sent only if the suer wants it andthe rest of the message was semi-recent.
… is really wierd but found info online. rest is good.

EmbedBuilder eb = new EmbedBuilder();
ArrayList<String> data = getAPODData();
eb.setAuthor("Photographer: " + data.get(2));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do add a if(data.get(2) != null) here


if (!(featureThree instanceof Feature)) {
assertNotEquals("!command", command);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if statement not needed

Copy link

@123456789degrees 123456789degrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality is good. The test coverage is 100% nice.


public class FeatureThree extends Feature {

private static final String baseUrl = "https://api.nasa.gov/planetary/apod?api_key=" + System.getenv("API_KEY");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesnt work without the api key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants