Skip to content

Commit

Permalink
chore: rename to sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
thlorenz committed Aug 21, 2023
1 parent e423edd commit 3e9e795
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @ironforge-cloud/platform-sdk [![Build+Test+Lint](https://github.com/ironforge-cloud/platform-sdk/actions/workflows/build-test-lint.yml/badge.svg)](https://github.com/ironforge-cloud/platform-sdk/actions/workflows/build-test-lint.yml)
# @ironforge-cloud/sdk [![Build+Test+Lint](https://github.com/ironforge-cloud/sdk/actions/workflows/build-test-lint.yml/badge.svg)](https://github.com/ironforge-cloud/sdk/actions/workflows/build-test-lint.yml)

IronForge platform SDK
IronForge SDK

## LICENSE

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@ironforge-cloud/platform-sdk",
"name": "@ironforge-cloud/sdk",
"version": "0.0.0",
"description": "IronForge platform SDK.",
"main": "src/platform-sdk.ts",
"types": "src/platform-sdk.ts",
"description": "IronForge SDK.",
"main": "src/sdk.ts",
"types": "src/sdk.ts",
"scripts": {
"build": "tsc",
"lint": "prettier --check .",
Expand Down
2 changes: 1 addition & 1 deletion src/platform-sdk.ts → src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export * from './accounts'
export * from './types'
export { accountsHostForEnv } from './utils'

export class PlatformSdk {
export class IronforgeSdk {
private readonly _accountsHost: string
constructor(
public apiKey: string,
Expand Down
14 changes: 7 additions & 7 deletions test/accounts-sdk.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'node:test'
import assert from 'assert/strict'
import { PlatformSdk } from '../src/platform-sdk'
import { IronforgeSdk } from '../src/sdk'
import spok from 'spok'

const API_KEY = process.env.IF_PLATFORM_API_KEY
Expand All @@ -10,7 +10,7 @@ if (API_KEY == null) throw new Error('IF_PLATFORM_API_KEY not set')
// Aggregate
// -----------------
test('accounts-sdk: aggregate', async () => {
const sdk = new PlatformSdk(API_KEY)
const sdk = new IronforgeSdk(API_KEY)
const { result, status } = await sdk.accounts.aggregate({
query: {
pipeline: [
Expand Down Expand Up @@ -53,7 +53,7 @@ test('accounts-sdk: aggregate', async () => {
// Filter By Type
// -----------------
test('accounts-sdk: filter by type', async (t) => {
const sdk = new PlatformSdk(API_KEY)
const sdk = new IronforgeSdk(API_KEY)
const { result, status } = await sdk.accounts.filterByType({
accountType: 'CandyMachine',
query: { filter: { 'data.data.price': 250 } },
Expand All @@ -74,7 +74,7 @@ test('accounts-sdk: filter by type', async (t) => {
// Filter
// -----------------
test('accounts-sdk: filter', async (t) => {
const sdk = new PlatformSdk(API_KEY)
const sdk = new IronforgeSdk(API_KEY)
const { result, status } = await sdk.accounts.filter({
query: { filter: { 'data.data.price': 250 } },
cluster: 'devnet',
Expand All @@ -94,7 +94,7 @@ test('accounts-sdk: filter', async (t) => {
// Find By Type
// -----------------
test('accounts-sdk: find by type', async (t) => {
const sdk = new PlatformSdk(API_KEY)
const sdk = new IronforgeSdk(API_KEY)
const { result, status } = await sdk.accounts.findByType({
accountType: 'CandyMachine',
cluster: 'devnet',
Expand All @@ -117,7 +117,7 @@ test('accounts-sdk: find by type', async (t) => {
// FindOne
// -----------------
test('accounts-sdk: findOne', async (t) => {
const sdk = new PlatformSdk(API_KEY)
const sdk = new IronforgeSdk(API_KEY)
const { result, status } = await sdk.accounts.findOne({
cluster: 'devnet',
program: 'cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ',
Expand Down Expand Up @@ -148,7 +148,7 @@ test('accounts-sdk: findOne', async (t) => {
// Memcmp
// -----------------
test('accounts-sdk: memcmp', async (t) => {
const sdk = new PlatformSdk(API_KEY)
const sdk = new IronforgeSdk(API_KEY)
const { result, status } = await sdk.accounts.memcmp({
query: {
filters: [
Expand Down

0 comments on commit 3e9e795

Please sign in to comment.