Skip to content

Commit

Permalink
Merge pull request #213 from amadeus4dev/SafePlaceDeco
Browse files Browse the repository at this point in the history
`Safe Place API` decommission
  • Loading branch information
minjikarin authored Apr 15, 2024
2 parents 7df9fdc + 2354506 commit 6b923c9
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 204 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,24 +448,6 @@ amadeus.location.analytics.categoryRatedAreas.get({
longitude : 2.160873
})

// Safe Place
// How safe is Barcelona? (based a geo location and a radius)
amadeus.safety.safetyRatedLocations.get({
latitude: 41.397158,
longitude: 2.160873
})

// How safe is Barcelona? (based on a square)
amadeus.safety.safetyRatedLocations.bySquare.get({
north: 41.397158,
west: 2.160873,
south: 41.394582,
east: 2.177181
})

// What is the safety information of a location based on its Id?
amadeus.safety.safetyRatedLocation('Q930400801').get()

// Tours and Activities
// What are the best tours and activities in Barcelona?
amadeus.shopping.activities.get({
Expand Down
30 changes: 0 additions & 30 deletions spec/amadeus/namespaces.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ describe('Namespaces', () => {
expect(amadeus.airport.predictions).toBeDefined();
expect(amadeus.airport.predictions.onTime).toBeDefined();

expect(amadeus.safety).toBeDefined();
expect(amadeus.safety.safetyRatedLocations).toBeDefined();
expect(amadeus.safety.safetyRatedLocations.bySquare).toBeDefined();
expect(amadeus.safety.safetyRatedLocation).toBeDefined();

expect(amadeus.location).toBeDefined();
expect(amadeus.location.analytics).toBeDefined();
expect(amadeus.location.analytics.categoryRatedAreas).toBeDefined();
Expand Down Expand Up @@ -148,10 +143,6 @@ describe('Namespaces', () => {

expect(amadeus.airport.predictions.onTime.get).toBeDefined();

expect(amadeus.safety.safetyRatedLocations.get).toBeDefined();
expect(amadeus.safety.safetyRatedLocations.bySquare.get).toBeDefined();
expect(amadeus.safety.safetyRatedLocation('XXX').get).toBeDefined();

expect(amadeus.location.analytics.categoryRatedAreas.get).toBeDefined();

expect(amadeus.airline.destinations.get).toBeDefined();
Expand Down Expand Up @@ -491,27 +482,6 @@ describe('Namespaces', () => {
.toHaveBeenCalledWith('/v1/airport/predictions/on-time', {});
});

it('.amadeus.safety.safetyRatedLocations.get', () => {
amadeus.client.get = jest.fn();
amadeus.safety.safetyRatedLocations.get();
expect(amadeus.client.get)
.toHaveBeenCalledWith('/v1/safety/safety-rated-locations', {});
});

it('.amadeus.safety.safetyRatedLocations.bySquare.get', () => {
amadeus.client.get = jest.fn();
amadeus.safety.safetyRatedLocations.bySquare.get();
expect(amadeus.client.get)
.toHaveBeenCalledWith('/v1/safety/safety-rated-locations/by-square', {});
});

it('.amadeus.safety.safetyRatedLocation().get', () => {
amadeus.client.get = jest.fn();
amadeus.safety.safetyRatedLocation('XXX').get();
expect(amadeus.client.get)
.toHaveBeenCalledWith('/v1/safety/safety-rated-locations/XXX');
});

it('.amadeus.shopping.availability.flightAvailabilities.post', () => {
amadeus.client.post = jest.fn();
amadeus.shopping.availability.flightAvailabilities.post();
Expand Down
2 changes: 0 additions & 2 deletions src/amadeus.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import EReputation from './amadeus/namespaces/e_reputation';
import Media from './amadeus/namespaces/media';
import Ordering from './amadeus/namespaces/ordering';
import Airport from './amadeus/namespaces/airport';
import Safety from './amadeus/namespaces/safety';
import Schedule from './amadeus/namespaces/schedule';
import Analytics from './amadeus/namespaces/analytics';
import Location from './amadeus/namespaces/location';
Expand Down Expand Up @@ -75,7 +74,6 @@ class Amadeus {
this.ordering = new Ordering(this.client);
this.airport = new Airport(this.client);
this.pagination = new Pagination(this.client);
this.safety = new Safety(this.client);
this.schedule = new Schedule(this.client);
this.analytics = new Analytics(this.client);
this.location = new Location(this.client);
Expand Down
29 changes: 0 additions & 29 deletions src/amadeus/namespaces/safety.js

This file was deleted.

33 changes: 0 additions & 33 deletions src/amadeus/namespaces/safety/safety_rated_location.js

This file was deleted.

47 changes: 0 additions & 47 deletions src/amadeus/namespaces/safety/safety_rated_locations.js

This file was deleted.

45 changes: 0 additions & 45 deletions src/amadeus/namespaces/safety/safety_rated_locations/by_square.js

This file was deleted.

0 comments on commit 6b923c9

Please sign in to comment.