Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-wp-api

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-wp-api - npm Package Versions

1345

2.1.2

Diff

Changelog

Source

2.1.2

Bugs:

  • Fixes WpHttp: used to return Observable.empty() instead of Observable.throw(err).

Improvements:

  • ModelResponse interface for WpService.Model() responses.
  • Errors can be caught from the response for both CollectionResponse and ModelResponse with res.error

Breaking Changes:

  • WpService.Model(): model response is now wrapped in ModelResponse object.

    Before:

    WpService.Model.(...).subscribe((res) => {
        this.data = res.data;
    }
    

    After:

    WpService.Model.(...).subscribe((res: ModelResponse) => {
        if(res.error){
            console.log(res.error);
        }
        else{
            this.data = res.data;
        }
    });
    
murhaf
published 2.1.1 •

murhaf
published 2.1.0 •

Changelog

Source

2.1.0

Use WpService.config instead of WpConfig to keep all usages in one service.

###Bugs:

  • Basic Authentication: Fixes request and return observable instead of void

    WpService.auth().basic(username,password).subscribe(...)

Features:

  • WpService.Collection(): Added next() and prev() functions

    • collectionService = wpService.collection().posts().get.subscribe(...) Get collection
    • collectionService.more().subscrube(...) Combine current page with next page collection
    • collectionService.next().subscrube(...) Get next page collection
    • collectionService.prev().subscrube(...) Get prev page collection
  • WpCollectionComponent: Added next() and prev() functions

  • Discovery endpoint: Discover if a url has WP API install. WpService.discover(url).subscribe(...)

  • Cookies Authentication: WpService.auth().cookies().subscribe(...)

Breaking Changes:

All helper classes has been prefixed with Wp

  • Post is now WpPost
  • User is now WpUser
  • QueryArgs is now WpQueryArgs
  • WpHelper.endpoint is now WpEndpoint
  • WpHelper is deprecated.
  • authentication notifier is deprecated from WpConfig.
murhaf
published 2.0.1 •

Changelog

Source

2.0.1

No changes.

  • added keywords to package.json
murhaf
published 2.0.0 •

Changelog

Source

2.0.0

The service has been rewritten from scratch

murhaf
published 1.2.9 •

Changelog

Source

1.2.9

BREAKING CHANGES:

  • Before:
    import {Collection} from 'ng2-wp-api/ng2-wp-api';
    
  • After:
    import {Collection} from 'ng2-wp-api';
    
murhaf
published 1.2.8 •

murhaf
published 1.2.7 •

Changelog

Source

1.2.7

Bug Fixes:

  • Collection response headers: fix property name for X-WP-Total and X-Wp-Totalpages
murhaf
published 1.2.6 •

murhaf
published 1.2.5 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc