Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 59 additions & 59 deletions GeolocationParams.ts
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
export class GeolocationParams {

ipAddress: string;
fields: string;
excludes: string;
lang: string;
ipAddresses: string[];
constructor() {
this.ipAddress = "";
this.fields = "";
this.excludes = "";
this.lang = "en";
this.ipAddresses = [];
}

setIPAddress(ipAddress: string = ""): void {
this.ipAddress = ipAddress;
}

getIPAddress(): string {
return this.ipAddress;
}

setFields(fields: string = ""): void {
this.fields = fields;
}

getFields(): string {
return this.fields;
}

setExcludes(excludes: string = ""): void {
this.excludes = excludes;
}

getExcludes(): string {
return this.excludes;
}

setLang(lang: string = "en"): void {
this.lang = lang;
}

getLang(): string {
return this.lang;
}

setIPAddresses(ipAddresses : string[] = []): void {
if(ipAddresses.length > 50) {
console.log("Max. number of IP addresses cannot be more than 50.");
} else {
this.ipAddresses = ipAddresses;
}
}

getIPAddresses(): string[] {
return this.ipAddresses;
}
export class GeolocationParams {
public ipAddress: string;
public fields: string;
public excludes: string;
public lang: string;
public ipAddresses: string[];

constructor() {
this.ipAddress = "";
this.fields = "";
this.excludes = "";
this.lang = "en";
this.ipAddresses = [];
}

public setIPAddress(ipAddress: string = ""): void {
this.ipAddress = ipAddress;
}

public getIPAddress(): string {
return this.ipAddress;
}

public setFields(fields: string = ""): void {
this.fields = fields;
}

public getFields(): string {
return this.fields;
}

public setExcludes(excludes: string = ""): void {
this.excludes = excludes;
}

public getExcludes(): string {
return this.excludes;
}

public setLang(lang: string = "en"): void {
this.lang = lang;
}

public getLang(): string {
return this.lang;
}

public setIPAddresses(ipAddresses: string[] = []): void {
if (ipAddresses.length > 50) {
// tslint:disable-next-line:no-console
console.log("Max. number of IP addresses cannot be more than 50.");
} else {
this.ipAddresses = ipAddresses;
}
}

public getIPAddresses(): string[] {
return this.ipAddresses;
}
}
Loading