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 Compare versions

Comparing version 1.0.7 to 1.0.8

3

models/args.model.ts
export class QueryArgs {
public author: string;

@@ -12,5 +13,5 @@ public context: any;

public _embed: boolean;
constructor(){
}
}
{
"name": "ng2-wp-api",
"version": "1.0.7",
"version": "1.0.8",
"description": "WordPress API Service for Angular2",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -22,3 +22,3 @@ import { Http, Response } from '@angular/http';

hasMore: () => boolean;
fetch: () => Observable<Response>;
private fetch;
}

@@ -67,3 +67,3 @@ import {Injectable} from '@angular/core';

public fetch = ():Observable<Response> => {
private fetch = ():Observable<Response> => {
let url = WpHelper.generateUrl(this.actionUrl, this.args);

@@ -70,0 +70,0 @@ let h = WpHelper.getHeaders(this.config);

@@ -13,3 +13,3 @@ import { Http, Response } from '@angular/http';

setEndpoint: (endpoint: string | WpHelper.Endpoint) => void;
get: (id: number) => Observable<Response>;
get: (id: any, args?: any) => Observable<Response>;
add: (body: any) => Observable<Response>;

@@ -16,0 +16,0 @@ update: (id: number, body: any) => Observable<Response>;

@@ -26,5 +26,6 @@ "use strict";

};
this.get = (id) => {
this.get = (id, args) => {
let url = helper_service_1.WpHelper.generateUrl(this.actionUrl + id, args);
let h = helper_service_1.WpHelper.getHeaders(this.config);
return this.http.get(this.actionUrl + id, { headers: h }).map(res => res.json());
return this.http.get(url, { headers: h }).map(res => res.json());
};

@@ -31,0 +32,0 @@ this.add = (body) => {

@@ -26,5 +26,6 @@ import {Injectable} from '@angular/core';

public get = (id:number):Observable<Response> => {
public get = (id, args?):Observable<Response> => {
let url = WpHelper.generateUrl(this.actionUrl + id, args);
let h = WpHelper.getHeaders(this.config);
return this.http.get(this.actionUrl + id, {headers: h}).map(res => res.json());
return this.http.get(url, {headers: h}).map(res => res.json());
}

@@ -31,0 +32,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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