Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
Ionic 3 Support (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkHerhold committed May 20, 2018
1 parent 2f10e4f commit dbb8048
Show file tree
Hide file tree
Showing 12 changed files with 369 additions and 426 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 BadgeUp LLC
Copyright (c) BadgeUp LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 6 additions & 8 deletions README.md
@@ -1,7 +1,5 @@
:warning: This client is still a work-in-progress.

# BadgeUp Ionic Client
Official Ionic client for working with [BadgeUp](https://www.badgeup.io/). This client supports Ionic v2/3.
Official Ionic client for working with [BadgeUp](https://www.badgeup.io/). This client supports Ionic 3.

[![Build Status](https://travis-ci.org/BadgeUp/badgeup-ionic-client.svg?branch=master)](https://travis-ci.org/BadgeUp/badgeup-ionic-client)

Expand Down Expand Up @@ -72,8 +70,8 @@ export class MyApp implements OnDestroy {

badgeUpNotificationCallback(notificationType: BadgeUpNotificationType, data: any) {
if(notificationType === BadgeUpNotificationType.NewAchievementEarned) {
let achievementEarnedData = <BadgeUpEarnedAchievement>data;
alert("You have received new achievement woop! " + achievementEarnedData.achievementId);
let ea = <BadgeUpEarnedAchievement>data;
alert("You earned a new achievement! " + ea.achievement.name);
}
}
}
Expand Down Expand Up @@ -113,12 +111,12 @@ If you'd like to pass dynamic data to any of the attributes, you'd have to use p
</button>
```

## Accessing the Underlying Browser Client
## Accessing the Underlying Client

You may want to interact with more of the APIs than the Ionic client currently exposes as a high-level interface.
You can access the underlying [badgeup-browser-client](https://github.com/BadgeUp/badgeup-browser-client) from the browser client:
You can access the underlying [JS client](https://github.com/BadgeUp/badgeup-node-client) from the client:

```ts
const client = this.badgeUpClient.badgeUpBrowserClient;
const client = this.badgeUpClient.badgeUpJSClient;
const achievements = await client.achievements.getAll();
```

0 comments on commit dbb8048

Please sign in to comment.