Permalink
Browse files

Removed unused methods

  • Loading branch information...
1 parent caa03a0 commit 0a87fda95aa235afa486e9ab7df4785ceae8cb6f Vishal-Sahu committed Oct 9, 2012
@@ -10,18 +10,7 @@ class FoursquareService {
@Delegate VenueService venueService
@Delegate CheckinsService checkinsService
- String getResponseFromFourSquare(String urlPath) {
- String responseData
- try {
- URL url = new URL(urlPath)
- responseData = url.text
- } catch (Exception e) {
- e.printStackTrace()
- }
- return responseData
- }
-
- String getResponseOfFoursquareQuery(String urlString) {
+ String getResponseOfQuery(String urlString) {
println("****** Querying URL: ${urlString}")
String responseString = ''
try {
@@ -8,7 +8,7 @@ class UserService extends FoursquareService {
List<User> userList = []
String urlString = getSearchUserUrl(oauthToken, 'phone', phone)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.results.each {
User user = new User(it)
@@ -24,7 +24,7 @@ class UserService extends FoursquareService {
List<User> userList = []
String urlString = getSearchUserUrl(oauthToken, 'email', email)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.results.each {
User user = new User(it)
@@ -40,7 +40,7 @@ class UserService extends FoursquareService {
List<User> userList = []
String urlString = getSearchUserUrl(oauthToken, 'twitter', twitter)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.results.each {
User user = new User(it)
@@ -56,7 +56,7 @@ class UserService extends FoursquareService {
List<User> userList = []
String urlString = getSearchUserUrl(oauthToken, 'name', name)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.results.each {
User user = new User(it)
@@ -72,7 +72,7 @@ class UserService extends FoursquareService {
List<Checkin> checkinList = []
String urlString = getUserCheckinsUrl(oauthToken)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.checkins.items.each {def checkinData ->
Checkin checkin = new Checkin(checkinData)
@@ -88,7 +88,7 @@ class UserService extends FoursquareService {
List<User> userList = []
String urlString = getFriendsListUrl(oauthToken)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.friends.items.each {def userData ->
User user = new User(userData)
@@ -104,7 +104,7 @@ class UserService extends FoursquareService {
List<User> userList = []
String urlString = getFriendsListUrl(oauthToken)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.friends.items.each {def userData ->
User user = new User(userData)
@@ -8,7 +8,7 @@ class VenueService extends FoursquareService {
List<Venue> venueList = []
String urlString = getSearchVenueUrl(latitude, longitude)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.venues.each {
Venue venue = new Venue(it)
@@ -24,7 +24,7 @@ class VenueService extends FoursquareService {
List<Venue> venueList = []
String urlString = getSearchVenueUrl(address)
try {
- String responseStr = getResponseOfFoursquareQuery(urlString)
+ String responseStr = getResponseOfQuery(urlString)
def jsonString = JSON.parse(responseStr)
jsonString.response.venues.each {
Venue venue = new Venue(it)

0 comments on commit 0a87fda

Please sign in to comment.