1.0.7 • Published 3 years ago

victoria-sdk v1.0.7

Weekly downloads
9
License
ISC
Repository
github
Last release
3 years ago

Victoria SDK

Victoria SDK provides an easy to access interface for frontend applications consuming data from the core API.

Installation

npm i victoria-sdk

or

yarn add victoria-sdk

Example usage:

import Victoria from 'victoria-sdk'

try {
  const key = 'my_victoria_api_key'
  // Only Specify the domain if you're developing localy
  const domain = 'http://127.0.0.1:3001'

  const victoria = new Victoria.VictoriaClient(key, domain)

  const client = await victoria.createClient()

  console.log(client) // blog data
} catch (err) {
  console.error(err)
}

Getting a post by ID

try {
  const posts = await client.getPostByID('some_random_post_id')

  console.log(posts) // Render posts
} catch (error) {
  console.error(err)
}

WIP...

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago