Skip to content

Commit

Permalink
feat: update prices
Browse files Browse the repository at this point in the history
  • Loading branch information
psincraian committed Jan 11, 2024
1 parent c2c902f commit cab3690
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 14 deletions.
58 changes: 49 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,57 @@

# Gas TUR Prices in Spain API

## Overview
Welcome to the Gas TUR Prices API for Spain! This project aims to provide easy access to Gas TUR (Tarifa de Último Recurso) prices in Spain in a convenient and parseable format. By making this data accessible, we hope to empower developers, businesses, and individuals to utilize gas price information for various applications.

# Features
* Real-time Data: The API returns real-time Gas TUR prices, ensuring that you always have the latest information.
* Easy to Integrate: The API is designed to be straightforward to integrate into your projects, whether you're building a mobile app, a website, or any other application.
* Simple Data Format: Gas prices are returned in a clear and easy-to-parse JSON format, making it hassle-free to incorporate into your code.
Welcome to the TUR Prices for Spain! This project aims to provide easy access to Gas TUR (Tarifa de Último Recurso) prices in Spain in a convenient and parseable format. By making this data accessible, we hope to empower developers, businesses, and individuals to utilize gas price information for various applications.

# Usage
To get started, simply make a GET request to the following endpoint:
## Features

- **Real-time Data:** The API returns real-time Gas TUR prices, ensuring that you always have the latest information.

- **Easy to Integrate:** The API is designed to be straightforward to integrate into your projects, whether you're building a mobile app, a website, or any other application.

- **Simple Data Format:** Gas prices are returned in a clear and easy-to-parse JSON format, making it hassle-free to incorporate into your code.

## Usage

To get started, simply make a GET request to the following endpoint:

```
TODO
https://TODO/latest
```

### Example Response:

```json
[
{
"tariff": "TUR1",
"date": "2023-10-01",
"variable_price": "0.0511",
"fixed_price": "3.85",
"currency": "EUR"
},
{
"tariff": "TUR2",
"date": "2023-10-01",
"variable_price": "0.0481",
"fixed_price": "7.12",
"currency": "EUR"
},
{
"tariff": "TUR3",
"date": "2023-10-01",
"variable_price": "0.0454",
"fixed_price": "14.92",
"currency": "EUR"
}
]
```


## Contribution

We welcome contributions from the community! If you find a bug, have an idea for a new feature, or want to improve the documentation, feel free to open an issue or submit a pull request.


Happy coding!
23 changes: 23 additions & 0 deletions api/v1/prices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"tariff": "TUR1",
"date": "2023-10-01",
"variable_price": "0.0511",
"fixed_price": "3.85",
"currency": "EUR"
},
{
"tariff": "TUR2",
"date": "2023-10-01",
"variable_price": "0.0481",
"fixed_price": "7.12",
"currency": "EUR"
},
{
"tariff": "TUR3",
"date": "2023-10-01",
"variable_price": "0.0454",
"fixed_price": "14.92",
"currency": "EUR"
}
]
28 changes: 23 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,29 @@ <h2>Usage</h2>
<p>To get started, make a GET request to the following endpoint:</p>
<pre><code>https://TODO/latest</code></pre>
<p>Example Response:</p>
<pre><code>{
"timestamp": "2024-01-11T12:30:00Z",
"gas_tur_price": 0.045,
"currency": "EUR"
}</code></pre>
<pre><code>[
{
"tariff": "TUR1",
"date": "2023-10-01",
"variable_price": "0.0511",
"fixed_price": "3.85",
"currency": "EUR"
},
{
"tariff": "TUR2",
"date": "2023-10-01",
"variable_price": "0.0481",
"fixed_price": "7.12",
"currency": "EUR"
},
{
"tariff": "TUR3",
"date": "2023-10-01",
"variable_price": "0.0454",
"fixed_price": "14.92",
"currency": "EUR"
}
]</code></pre>
</section>

<section>
Expand Down

0 comments on commit cab3690

Please sign in to comment.