From 75dfa2fad0dd040e4757f77768a181146eb1a92f Mon Sep 17 00:00:00 2001 From: pangz Date: Thu, 25 Apr 2024 12:57:49 +0900 Subject: [PATCH] added web support --- CHANGELOG.md | 3 +++ README.md | 15 ++++++++------- lib/src/domain/base_endpoint.dart | 3 +-- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92e3cca..63ece92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.2.2 +2024/04/25 JST +- Added Web support ## 1.2.1 2023/08/26 JST - README update to change the versioning diff --git a/README.md b/README.md index b2b481a..2c99a20 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - -![version](https://img.shields.io/badge/version-v1.2.1-blue) + +![version](https://img.shields.io/badge/version-v1.2.2-blue) ![coverage](https://img.shields.io/badge/coverage-100%25-success) ![sdk](https://img.shields.io/badge/sdk-v2.19.3-blue) ![license](https://img.shields.io/badge/license-BSD--3-blue) @@ -12,7 +12,7 @@ follow on witter -

+ # coingecko_client -## Coingecko API client for Dart +## CoinGecko API client for Dart

- + +

A simple and intuitive package for the [CoinGecko REST API Service](https://www.coingecko.com/en/api/documentation) ( v3 ). @@ -93,7 +94,7 @@ Installation Add the dependency to your Dart / Flutter project:
( in `pubspec.yaml` file under the `dependencies`, add the following ) ```yaml -coingecko_client: ^1.2.1 +coingecko_client: ^1.2.2 ```

Go to pub.dev for more details.

diff --git a/lib/src/domain/base_endpoint.dart b/lib/src/domain/base_endpoint.dart index dde9754..6c6c7ec 100644 --- a/lib/src/domain/base_endpoint.dart +++ b/lib/src/domain/base_endpoint.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:io'; import 'package:coingecko_client/src/models/exceptions/data_parsing_exception.dart'; import 'package:coingecko_client/src/models/exceptions/network_request_exception.dart'; import 'package:coingecko_client/src/models/exceptions/request_exception.dart'; @@ -70,7 +69,7 @@ class BaseEndpoint { final query = urlComponent.length > 1 ? urlComponent.elementAt(1) : null; final response = await httpRequestService .sendGet(host, urlComponent.elementAt(0), query, headers: headers); - if (response.statusCode != HttpStatus.ok) { + if (response.statusCode != 200) { throw NetworkRequestException.failedResponse( response.statusCode, response); } diff --git a/pubspec.yaml b/pubspec.yaml index 4e17b03..d7e9763 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: coingecko_client description: A simple and intuitive package for the CoinGecko REST API Service ( v3 ) -version: 1.2.1 +version: 1.2.2 repository: https://github.com/pangz-lab/coingecko_client license: BSD 3-Clause