# TimeZoneAPI

## Timezone API リファレンス

### サービス名

**Timezone API**

### 利用用途

`Timezone API`は、指定されたタイムゾーンにおける現在の日時を取得するためのAPIです。このAPIを利用することで、異なる都市や地域の現在時刻を取得し、アプリケーションやウェブサイトでの時間表示に役立てることができます。

***

### API エンドポイント

```
https://events-front.mixeder.net/v1/timezone
```

***

### パラメータ

| パラメータ      | 必須 | 説明                               |
| ---------- | -- | -------------------------------- |
| `key`      | 必須 | 利用者のAPIキー                        |
| `timezone` | 必須 | 取得したい都市のタイムゾーン名（例: `Asia/Tokyo`） |

***

### 利用方法

1. 有効なAPIキーを用意します。
2. 取得したいタイムゾーンを`timezone`パラメータに指定します。
3. APIリクエストを送信すると、指定されたタイムゾーンの現在時刻が返されます。

***

### サンプルコード

#### cURL

```bash
curl "https://events-front.mixeder.net/v1/timezone?key=YOUR_API_KEY&timezone=Asia/Tokyo"
```

#### Node.js

```javascript
const https = require('https');

const url = 'https://events-front.mixeder.net/v1/timezone?key=YOUR_API_KEY&timezone=Asia/Tokyo';

https.get(url, (res) => {
    let data = '';
    res.on('data', (chunk) => {
        data += chunk;
    });
    res.on('end', () => {
        console.log(data);
    });
}).on('error', (err) => {
    console.error('Error: ' + err.message);
});
```

#### Python

```python
import requests

url = "https://events-front.mixeder.net/v1/timezone"
params = {
    "key": "YOUR_API_KEY",
    "timezone": "Asia/Tokyo"
}

response = requests.get(url, params=params)
if response.status_code == 200:
    print(response.json())
else:
    print(f"Error: {response.status_code}")
```

***

### エラーメッセージ

* **API Key not provided.**: APIキーが指定されていません。
* **Timezone not provided.**: タイムゾーンが指定されていません。
* **API key is wrong**: APIキーが無効です。

***

### 注意事項

* 有効なAPIキーが必要です。指定がない場合や無効な場合はリクエストは拒否されます。
* `timezone`パラメータには、正確なタイムゾーン名（例: `Asia/Tokyo`, `America/New_York`）を指定してください。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.mixeder.net/mixederpublicapis/apirifarensu/timezoneapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
