Skip to content

Commit

Permalink
Version bump for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanempire committed Aug 7, 2023
1 parent a34ea9b commit 8e3ed7e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opensubs",
"version": "0.9.2",
"description": "An NPM module for calling the OpenSubtitles API",
"version": "1.0.0",
"description": "A modern NPM library for calling the OpenSubtitles API",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/core/NetworkRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class NetworkRequestHandler {
* @param includeApiKey Flag indicating if the API key should be included in the headers.
* @param headers Object of all headers to include in the request.
* @param data Data object to send in the body of the request.
* @return {Result} wrapped response from all endpoint requests.
*/
performNetworkCall = async(httpMethod: HttpMethods, endpoint: string, includeApiKey: boolean, headers: object, data?: object): Promise<Result<any>> => {
const requestHeaders = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type RequestDownloadParams = {
}

/**
* Request parameters for findFeatures() call
* Request parameters for findFeatures() call.
*/
export type FindFeaturesParams = {
// OpenSubtitles feature_id
Expand Down
4 changes: 2 additions & 2 deletions src/endpoints/Authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Authentication {

/**
* Log the current user in to set the JWT.
* @return {Result} wrapped response from login endpoint
* @return {Result} wrapped response from login endpoint.
*/
async login(): Promise<any> {
const userCredentials = this.credentialManager.getUserCredentials();
Expand Down Expand Up @@ -46,7 +46,7 @@ class Authentication {

/**
* Log the current user out and reset the JWT.
* @return {Result} wrapped response from logout endpoint
* @return {Result} wrapped response from logout endpoint.
*/
async logout(): Promise<any> {
try {
Expand Down
18 changes: 9 additions & 9 deletions src/endpoints/Discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Discover {
/**
* Get the most popular features for the given languages and type.
*
* @param languages A list of language codes, like "en,es" - can verify with info.getLanguages() first
* @param type What kind of popular features to look for
* @return {Result} wrapped response from getPopularFeatures endpoint
* @param languages A list of language codes, like "en,es" - can verify with info.getLanguages() first.
* @param type What kind of popular features to look for.
* @return {Result} wrapped response from getPopularFeatures endpoint.
*/
getPopularFeatures = async(languages: string, type: string): Promise<any> => {
return await this.networkRequestHandler.performNetworkCall(
Expand All @@ -30,9 +30,9 @@ class Discover {
/**
* Get a list of the latest subtitles for the given string of languages and feature type.
*
* @param languages A list of language codes, like "en,es" - can verify with info.getLanguages() first
* @param type What kind of feature the subtitles are for - movie or tvshow
* @return {Result} wrapped response from getLatestSubtitles endpoint
* @param languages A list of language codes, like "en,es" - can verify with info.getLanguages() first.
* @param type What kind of feature the subtitles are for - movie or tvshow.
* @return {Result} wrapped response from getLatestSubtitles endpoint.
*/
getLatestSubtitles = async(languages: string, type: string): Promise<any> => {
return await this.networkRequestHandler.performNetworkCall(
Expand All @@ -45,9 +45,9 @@ class Discover {

/**
* Get a list of the most downloaded subtitles for the given string of languages and feature type.
* @param languages A list of language codes, like "en,es" - can verify with info.getLanguages() first
* @param type What kind of feature the subtitles are for - movie or tvshow
* @return {Result} wrapped response from getMostDownloaded endpoint
* @param languages A list of language codes, like "en,es" - can verify with info.getLanguages() first.
* @param type What kind of feature the subtitles are for - movie or tvshow.
* @return {Result} wrapped response from getMostDownloaded endpoint.
*/
getMostDownloaded = async(languages: string, type: string): Promise<any> => {
return await this.networkRequestHandler.performNetworkCall(
Expand Down
4 changes: 2 additions & 2 deletions src/endpoints/Download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class Download {

/**
* Request the download URL for a certain subtitle. Subtitle file in the temporary URL will be UTF-8 encoded.
* @param requestParams {RequestDownloadParams} to use for the download request
* @return {Result} wrapped response from requestDownload endpoint
* @param requestParams {RequestDownloadParams} to use for the download request.
* @return {Result} wrapped response from requestDownload endpoint.
*/
requestDownload = async(requestParams: RequestDownloadParams): Promise<any> => {
return await this.networkRequestHandler.performNetworkCall(
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/Features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Features {

/**
* Search for a feature from a given text input.
* @param requestParams {FindFeaturesParams} to use for the find features request
* @param requestParams {FindFeaturesParams} to use for the find features request.
* @return {Result} wrapped response from findFeatures endpoint.
*/
findFeatures = async(requestParams: FindFeaturesParams): Promise<any> => {
Expand Down

0 comments on commit 8e3ed7e

Please sign in to comment.