ngx-jsonapi icon indicating copy to clipboard operation
ngx-jsonapi copied to clipboard

[v3.0.0] Examples show JsonRipper and StoreService imports but they are not in the public_api file

Open BenLune opened this issue 3 years ago • 1 comments

Hi, Congratulations for this lib, it seems quite interesting and powerful. I'm trying to use it and it works. I would like to test the cache capabilities and when I look at the doc, it isn't very clear. Example shows the use of JsonRipper and StoreService, but they're not in the public_api.

Also, in the doc, you should write the new way to init JsonapiBootstrap this way :

JsonapiBootstrap.bootstrap({
      user_config: {url: 'https://my.api'}
});

I discovered the bootstrap static function looking at the code.

Thank you for the lib and for your help !

BenLune avatar Aug 25 '21 03:08 BenLune

Here, in your example :

import { NgxJsonapiModule } from 'ngx-jsonapi';
import { StoreService } from 'ngx-jsonapi/sources/store.service';
import { JsonRipper } from 'ngx-jsonapi/services/json-ripper';

@NgModule()
export class AppModule {
    public constructor() {
        JsonapiBootstrap({
            user_config: { url: '//jsonapiplayground.reyesoft.com/v2/' },
            jsonapiStore: new StoreFakeService(),
            jsonRipper: new JsonRipperFake()
        });
    }
}

You import import { StoreService } from 'ngx-jsonapi/sources/store.service'; import { JsonRipper } from 'ngx-jsonapi/services/json-ripper'; Those classes are not exported in the public_api file, so we can't use them or I missed something.

but you use StoreFakeService and JsonRipperFake instead, this example doesn't seems to work.

BenLune avatar Aug 25 '21 16:08 BenLune