1.0.59 • Published 3 years ago

@tintup/tint-sdk v1.0.59

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

Tint SDK

A SDK for TINT Clients. A bunch of methods that allow to building own themes.

Installation

npm install @tintup/tint-sdk

Or

yarn install @tintup/tint-sdk

Quick start

  1. Create the Tint instance: const tint = new Tint(tintSlug) You can get the tint slug by going to Tint website and creating a new Tint.
  2. After you crate the new instance you should run up method on the instance to get the basic data: tint.up().

Examples:

Pagination
const tint = new Tint('mySlug');
const { postsResponse } = await tint.up();
const links = postsResponse.links;

if (links.next) {
  const { posts: nextPosts, inks: getPageNewLinks, postsRelationships: nextPostRelationships } = await tint.getPage(
    links.next
  );
}
Long polling events
  const tint = new Tint('mySlug');
  const { pollingObserver, postsResponse } = await tint.up();

  let postsToDisplay = postsResponse.posts;

  if (pollingObserver) {
    pollingObserver.subscribe(async (posts) => {
      postsToDisplay = posts;
    });
1.0.59

3 years ago

1.0.58

3 years ago

1.0.57

3 years ago

1.0.55

3 years ago

1.0.54

3 years ago

1.0.53

3 years ago

1.0.52

3 years ago

1.0.56

3 years ago

1.0.51

3 years ago

1.0.50

3 years ago

1.0.49

3 years ago

1.0.48

4 years ago

1.0.47

4 years ago

1.0.46

4 years ago

1.0.45

4 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.41

4 years ago

1.0.40

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15-b

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago