Skip to content

Commit

Permalink
Example added & General enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
gre-dev committed Mar 10, 2024
1 parent 25083fb commit 09b10ef
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.svn/
migrate_working_dir/
.vscode
.github

# IntelliJ related
*.iml
Expand Down
1 change: 1 addition & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.git
.github
.dart_tool
.vscode
build
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
## 1.0.2

- Example added to the package

## 1.0.1

* More comments added to `lib/greip.dart` file
* All package files are formatted to match the Dart formatter
* Package description modified
- More comments added to `lib/greip.dart` file
- All package files are formatted to match the Dart formatter
- Package description modified

## 1.0.0

* Initial commit
- Initial commit
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ To use the package in your Flutter project, just add it as a dependency in your

```yaml
dependencies:
greip: ^1.0.0
greip: ^1.0.2
```
Then, run the following command to install the package:
```dart
flutter pub get
```
Expand Down Expand Up @@ -60,6 +61,7 @@ Before making any API requests, you need to set your API token (API Key) using t
```dart
greip.setToken('your-greip-token');
```

Replace `your-greip-token` with your actual [Greip API key](https://docs.greip.io/dashboard-guides/account-management/obtaining-api-key).

That's it 🥳, now you're ready to start using the package methods.
Expand Down Expand Up @@ -198,8 +200,6 @@ This method provides an additional layer of validation for your system. While va

This method goes beyond syntax validation by checking the domain’s validity, the availability of the Mail Service, detecting Disposable Email (Temporary Emails), etc. By utilising this method, you can ensure a more thorough validation process for email addresses.



```dart
import 'package:greip/src/enums/mode.dart';
Expand Down Expand Up @@ -328,4 +328,4 @@ You can find the full guide of this package by visiting our [documentation page]

## Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or create a pull request.
54 changes: 54 additions & 0 deletions example/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Example

This example demonstrates how to use the Greip package in a Flutter application.

## Getting Started

1. Add the Greip package to your `pubspec.yaml` file:

```yaml
dependencies:
greip: ^1.0.2
```
2. Import the Greip package in your Dart code:
```dart
import 'package:greip/greip.dart';
```

3. Import the Enums you need:

```dart
import 'package:greip/src/enums/mode.dart';
import 'package:greip/src/enums/param.dart';
import 'package:greip/src/enums/language.dart';
```

4. Initialize the Greip package and use its functionalities:

```dart
void main() {
Greip greip = Greip();
greip.setToken('your-greip-token');
try {
Map<String, dynamic> result = await greip.geoIp(params: [
Param.security,
Param.currency,
Param.timezone,
Param.location,
], lang: Language.en, mode: Mode.live);
print(result);
} catch (e) {
print('Error: $e');
}
}
```

5. Run your Flutter application to see the package in action.

## Additional Information

- For detailed API documentation, refer to the [official API reference](https://docs.greip.io/).
- Check out the tests included in the package for usage examples.
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: greip
description: "The official Flutter package for the Greip API simplifies the integration of Greip services into Flutter applications."
version: 1.0.1
version: 1.0.2
homepage: "https://greip.io/"
repository: "https://github.com/Greipio/flutter"
issue_tracker: "https://github.com/Greipio/flutter/issues"
Expand All @@ -22,7 +22,7 @@ topics:
- iban

environment:
sdk: '>=3.3.0 <4.0.0'
sdk: ">=3.3.0 <4.0.0"
flutter: ">=1.17.0"

dependencies:
Expand Down

0 comments on commit 09b10ef

Please sign in to comment.