0.2.1-3 • Published 2 years ago

@tv2reg/bazo-data-sdk v0.2.1-3

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

TODO

  • PublicResource: $find - virker lidt mærkelig?

Examples

const liveblog = new Liveblog()

const liveblogEntry = new LiveblogEntry({ // liveblog/{id}/entry/{id} liveblogId: '.......', liveblog: liveblog, })

const liveblog = new LiveblogQuery().find(liveblogId) liveblog.entries() // new LiveblogEntryQueryBuilder({ liveblog_id: liveblogId, // api/liveblog/{liveblogId}/entries filter: { liveblog_uuid: liveblogId } })

// ArticlePrivateResource const article = new PrivateArticle({ ...data, $dataClient?: new DataClient(dataClientPropsWithAxios) || DataClientSingleton }) article.title, article.name, article.{property} article.authors = AuthorResource, AuthorResource, ... article.$find({id}) // article.$refresh() article.$save() article.$update() article.$delete() article._populate() // creates resources from data like authors, etc..

// ArticlePrivateQueryBuilder const articleQuery = article.query() article.where() article.limit() article.sortBy() article.offset() article.get() article.first() article.next() article.previous() article.find(articleId) => new ArticlePrivateResource

// ArticlePrivateResourceCollection const articleCollection = articleQuery.where().limit().get() articleCollection.index = 0 articleCollection.query = ArticlePrivateQueryBuilder articleCollection.next() // articleCollection.at(articleCollection.index + 1) articleCollection.previous() // articleCollection.at(articleCollection.index - 1) articleCollection.nextPage() // articleCollection.query.next().get() => ArticlePrivateResourceCollection articleCollection.previousPage() // articleCollection.query.previous().get() => ArticlePrivateResourceCollection articleCollection.collection // rawResponseData, rawResponseData, ... articleCollection.get() // ArticlePrivateResource, ArticlePrivateResource, ... articleCollection.at(idx) // articleCollection.get()idx === ArticlePrivateResource articleCollection.first() // articleCollection.at(0) === ArticlePrivateResource articleCollection.query() // new ArticlePrivateQuery

0.2.1-3

2 years ago

0.2.1-2

2 years ago

0.2.1-1

2 years ago

0.2.1-0

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.1-23

2 years ago

0.0.1-24

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.2.0

2 years ago

0.0.1-16

2 years ago

0.0.1-15

2 years ago

0.0.1-18

2 years ago

0.0.1-17

2 years ago

0.0.1-19

2 years ago

0.0.1-21

2 years ago

0.0.1-20

2 years ago

0.0.1-22

2 years ago

0.0.1-14

2 years ago

0.0.1-13

2 years ago

0.0.1-12

2 years ago

0.0.1-11

2 years ago

0.0.1-10

2 years ago

0.0.1-9

2 years ago

0.0.1-8

2 years ago

0.0.1-7

2 years ago

0.0.1-6

2 years ago

0.0.1-5

2 years ago

0.0.1-4

2 years ago

0.0.1-3

2 years ago

0.0.1-2

2 years ago

0.0.1-1

2 years ago

0.0.18-alpha

2 years ago

0.0.17-alpha

2 years ago

0.0.16-alpha

2 years ago

0.0.15-alpha

2 years ago

0.0.14-alpha

2 years ago

0.0.13-alpha

2 years ago

0.0.12-alpha

2 years ago

0.0.11-alpha

2 years ago

0.0.10-alpha

2 years ago

0.0.9-alpha

2 years ago

0.0.8-alpha

2 years ago

0.0.7-alpha

2 years ago

0.0.6-alpha

2 years ago

0.0.5-alpha

2 years ago

0.0.4-alpha

2 years ago

0.0.3-alpha

2 years ago

0.0.2-alpha

2 years ago

0.0.1-alpha

2 years ago