Git Product home page Git Product logo

star-citizen-events-api's Introduction

Star Citizen Events API

This is a simple API to get the past events in Star Citizen. It is based on the Star Citizen Wiki as well as sourced from the community.

Usage

The API is available at . It is a simple GET request that returns a JSON object with the following structure:

    [
        {
            "id": 1,
            "name": "Red Festival",
            "alternativeName": "Lunar New Year",
            "description": "Launch into the Lunar New Year with a bold new adventure from January 20 through February 6.\n\nTo ring in a prosperous Year of the Rabbit here on Earth in 2023, and Year of the Rooster in 2953 Stanton, we're inviting you to celebrate the Red Festival with us. As is tradition throughout the UEE, red envelopes have been hidden across Stanton, and we're offering a variety of red and gold ship paints to tempt good fortune in the year ahead.",
            "knownIncorrect": null,
            "startDateTime": "2023-01-20T00:00:00",
            "endDateTime": "2023-02-06T00:00:00",
            "ingameStartDateTime": "2953-01-20T00:00:00",
            "ingameEndDateTime": "2953-02-06T00:00:00",
            "displayName": "Red Festival 2953"
        },
        {
            ...
        }
    ]

You can also get a single event by using the id parameter. For example, to get the event with the id of 1, you would use the following endpoint: /api/v1/ingame/events/1. This will return the following JSON object:

    {
        "id": 1,
        "name": "Red Festival",
        "alternativeName": "Lunar New Year",
        "description": "Launch into the Lunar New Year with a bold new adventure from January 20 through February 6.\n\nTo ring in a prosperous Year of the Rabbit here on Earth in 2023, and Year of the Rooster in 2953 Stanton, we're inviting you to celebrate the Red Festival with us. As is tradition throughout the UEE, red envelopes have been hidden across Stanton, and we're offering a variety of red and gold ship paints to tempt good fortune in the year ahead.",
        "knownIncorrect": null,
        "startDateTime": "2023-01-20T00:00:00",
        "endDateTime": "2023-02-06T00:00:00",
        "ingameStartDateTime": "2953-01-20T00:00:00",
        "ingameEndDateTime": "2953-02-06T00:00:00",
        "displayName": "Red Festival 2953"
    }

Notes:

  • The id is the unique identifier for the event. It should not be used for sorting events by time.
  • The displayName is the name of the event with the year appended to it. This is useful for displaying the event in a list. The formula for calculating it may change as events are added.
  • The field knownIncorrect will list any known issues with the data. If this field is populated on any returns to you, treat the response with care.
  • The ingameStartDateTime and ingameEndDateTime are the start and end dates of the event in the Star Citizen universe. This is useful for displaying the event in a list. The formula for calculating it may change as lore progresses. Currently, it just adds 930 years to the startDateTime and endDateTime values.

Contributing

If you would like to contribute to this project, please feel free to submit a pull request.

Adding an event via Issue

Click here to create a new issue

Adding an event via json file

If you would like to add an event, please add it to the events.json file, then make a pull request. The format is as follows:

   {
    "Id": "1",
    "AlternativeName": "Lunar New Year",
    "Description": "Launch into the Lunar New Year with a bold new adventure from January 20 through February 6.\n\nTo ring in a prosperous Year of the Rabbit here on Earth in 2023, and Year of the Rooster in 2953 Stanton, we\u0027re inviting you to celebrate the Red Festival with us. As is tradition throughout the UEE, red envelopes have been hidden across Stanton, and we\u0027re offering a variety of red and gold ship paints to tempt good fortune in the year ahead.",
    "KnownIncorrect": null,
    "Name": "Red Festival",
    "StartDateTime": "01/20/2023 00:00:00",
    "EndDateTime": "02/06/2023 00:00:00"
  }

Adding an event via api

You can also run the API locally and add an event via the /api/v1/ingame/events endpoint with a POST request. Then open a pull request with the changes to the events.json file. The format of the /api/v1/ingame/events POST endpoint is as follows:

{
  "name": "string",
  "alternativeName": "string",
  "description": "string",
  "startDateTime": "2023-03-03T16:26:08.473Z",
  "endDateTime": "2023-03-03T16:26:08.473Z"
}

Updating an event via json file

Please only update one event/category per PR.

If you would like to update an event, please update it in the events.json file, then make a pull request.

If you would like to update multiple events, please submit multiple PRs.

Building

To build the project, you will need to have the .NET Core SDK installed. Then, you can run the following command:

dotnet build

Running

To run the project, you will need to have the .NET Core SDK installed.

You will also need to trust the development certificate. You can do this by running the following command:

dotnet dev-certs https --trust

Then, you can run the following command:

dotnet run --launch-profile https

License

Credits

star-citizen-events-api's People

Contributors

dependabot[bot] avatar jacobwoodson avatar ntindle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

star-citizen-events-api's Issues

[Event Fix]: End Date for Red Festival 2020 is unconfirmed

Contact Details

No response

What's the Id of the event?

12

What's the name of the event?

Red Festival

What's the alternate name of the event?

No response

What month does the event start in?

None

What day of the month does the event start on?

None

What year did the event start in?

None

What month does the event end in?

None

What day of the month does the event end on?

None

What year did the event end in?

None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.