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

newsware

Package Overview
Dependencies
Maintainers
0
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newsware - npm Package Compare versions

Comparing version 10.0.0-beta.23 to 10.0.0-beta.24

4

lib/src/api.d.ts

@@ -9,4 +9,4 @@ import { RestHelper } from "./rest-helper";

getById(id: string, errorHandler?: (apiResponse: RestResponseError<News>) => void): Promise<News>;
getCategoryCodes(source: string): Promise<CategoryCode[]>;
getSources(): Promise<SourceDetails[]>;
static getCategoryCodes(source: string, endpoint?: EndpointDescription): Promise<CategoryCode[]>;
static getSources(endpoint?: EndpointDescription): Promise<SourceDetails[]>;
}

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

}
getCategoryCodes(source) {
static getCategoryCodes(source, endpoint = enums_1.Endpoint.PRODUCTION) {
return __awaiter(this, void 0, void 0, function* () {
return (yield this.restHelper.get('/category-codes', {
return (yield new rest_helper_1.RestHelper(endpoint)
.get('/category-codes', {
source

@@ -42,5 +43,5 @@ })).data;

}
getSources() {
static getSources(endpoint = enums_1.Endpoint.PRODUCTION) {
return __awaiter(this, void 0, void 0, function* () {
return (yield (this.restHelper.get('/sources'))).data;
return (yield (new rest_helper_1.RestHelper(endpoint).get('/sources'))).data;
});

@@ -47,0 +48,0 @@ }

{
"name": "newsware",
"version": "10.0.0-beta.23",
"version": "10.0.0-beta.24",
"description": "Typescript client for interacting with the Newsware API",

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

@@ -37,11 +37,16 @@ import { Endpoint } from "./enums"

async getCategoryCodes(source: string): Promise<CategoryCode[]> {
return (await this.restHelper.get<CategoryCode[]>('/category-codes', {
source
})).data;
static async getCategoryCodes(source: string, endpoint: EndpointDescription = Endpoint.PRODUCTION): Promise<CategoryCode[]> {
return (
await new RestHelper(endpoint)
.get<CategoryCode[]>('/category-codes', {
source
})
).data;
}
async getSources(): Promise<SourceDetails[]> {
return (await (this.restHelper.get<SourceDetails[]>('/sources'))).data;
static async getSources(endpoint: EndpointDescription = Endpoint.PRODUCTION): Promise<SourceDetails[]> {
return (
await (new RestHelper(endpoint).get<SourceDetails[]>('/sources'))
).data;
}
}

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