Coder Social home page Coder Social logo

yelp-fusion-android's People

Contributors

ranga543 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

yelp-fusion-android's Issues

How to get more than 50 businesses?

I don't know how to get more than 50 results for a business search made.

For some reason, the maximum value for limit can be set to only 50. The getTotal method gives me 328 results when I set the limit to 50.

This only lets me get 50 results out of 328. How do I get the rest 278 results?

Thanks.

Cant seem to get the API keys to work.

public class selectionPage extends AppCompatActivity {
TextView mRestaurantTitle, mRateCat;
ImageView mMainImage;
YelpFusionApiFactory mApiFactory;
YelpFusionApi mYelpFusionApi;
Map<String, String> mParams;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.selection_page);

    mRestaurantTitle = (TextView) findViewById(R.id.titleLabel);
    mRateCat = (TextView) findViewById(R.id.rateCatLabel);
    mMainImage = (ImageView) findViewById(R.id.mainImage);

    Picasso
            .with(this)
            .load("http://i.imgur.com/DvpvklR.png")
            .into(mMainImage);

    mMainImage.setOnTouchListener(new OnSwipeTouchListener(this){
        public void onSwipeTop() {
            Toast.makeText(selectionPage.this, "top", Toast.LENGTH_SHORT).show();
        }
        public void onSwipeRight() {
            Toast.makeText(selectionPage.this, "right", Toast.LENGTH_SHORT).show();
        }
        public void onSwipeLeft() {
            Toast.makeText(selectionPage.this, "left", Toast.LENGTH_SHORT).show();
        }
        public void onSwipeBottom() {
            Toast.makeText(selectionPage.this, "bottom", Toast.LENGTH_SHORT).show();
        }
    });


    mApiFactory = new YelpFusionApiFactory();
    try {
        mYelpFusionApi = mApiFactory.createAPI(
                getResources().getString(R.string.appId),
                getResources().getString(R.string.appSecret)
        );
    } catch (IOException e) {
        e.printStackTrace();
    }

    mParams = new HashMap<>();
    mParams.put("term", "indian food");

    new FetchPictures().execute();
}

class FetchPictures extends AsyncTask<String, String, String> {

    @Override
    protected void onProgressUpdate(String... values) {
        super.onProgressUpdate(values);
    }

    @Override
    protected String doInBackground(String... params) {

        Call<SearchResponse> call = mYelpFusionApi.getBusinessSearch(mParams);

        Response<SearchResponse> response = null;

        try {
            response = call.execute();
        } catch (IOException e) {
            e.printStackTrace();
        }

        if(response != null) {
            Log.v("Business", response.body().getBusinesses().toString());
        }
      //  call.enqueue(callback);
        return null;
    }
}

}

Example code is erroneous?

               
 Map<String, String> params = new HashMap<>();
                params.put("term", "Boba");
                params.put("latitude", "37.86701009652528");
                params.put("longitude", "-122.2539898316383");

                Call<SearchResponse> call = yelpFusionApi.getBusinessSearch(params);

This is my SearchResponse call to get params, but get java.lang.NullPointerException: Attempt to invoke interface method 'retrofit2.Call com.yelp.fusion.client.connection.YelpFusionApi.getBusinessSearch(java.util.Map)' on a null object reference

This is after I long click on my android screen, to invoke a business search (Trying to make a basic yelp app in android).

In the examples it shows two calls, Call call = yelpFusionApi.getBusinessSearch(params); and Call call = yelpFusionApi.getBusinessSearch("San Francisco", params);

getBusinessSearch only takes in Map<String, String> params, so why is there an extra string in the arguments?

Yelp Fusion (Android Studio) help!

NOTE: the instructions seem pretty straightforward so I'm actually super confuse why I'm having so much trouble....
So I’ve been running into a number of problems all of which force my app to crash the first being when i make a call to the YelpFusionApiFactory’s createAPI function passing the appID and the AppSecret. I was able to get around this by going to a third party (i.e. Rapid) which generated the access token. i know use the …Factory’s createAPI function passing in the access token. however this does not fix the original problem i was having the next few problems all occur when trying to use the actual api for instance calling execute on the response object....i am a newbie to yelp and android studio...though i feel i have come accustom to android studio .....THANK YOU IN ADVANCE FOR ANY HELP
the app itself doesn't do anything.. at the moment I'm just trying to get comfortable with api

screen shot 2017-05-09 at 9 02 55 am

Category is not serializable

When trying to pass a list of businesses from one activity to another, it fails with Caused by: java.io.NotSerializableException: com.yelp.fusion.client.models.Category

It appears as though Category is not serializable. Can changes be made to fix this?

Missing bintray.properties file?

When I try to compile this, I get an error about:
../yelp-fusion-android-master/bintray.properties (No such file or directory)

Should I make my own such file? If so, how do I know what it looks like?
I note this file is in your gitignore, but it seems like it's needed for the code below in your gradle file:

Properties bintrayProperties = new Properties()
bintrayProperties.load(project.rootProject.file('bintray.properties').newDataInputStream())

bintray {
user = bintrayProperties.getProperty('user')
key = bintrayProperties.getProperty('key')
configurations = ['archives']
pkg {
repo = 'android'
name = 'yelp-fusion-client'
userOrg = 'ranga543'
licenses = ['MIT']
vcsUrl = 'https://github.com/ranga543/yelp-fusion-android.git'
publish = true
githubRepo = 'ranga543/yelp-fusion-android'
githubReleaseNotesFile = 'README.md'
version {
name = '0.1.5'
desc = 'Yelp Fusion Client 0.1.5'
released = new Date()
vcsTag = 'v0.1.5'
gpg {
sign = true
passphrase = bintrayProperties.getProperty('gpg.password')
}
}
}
}

Dependency resolution error

Building a project with Maven dependency:

<dependency> 
<groupId>io.github.ranga543</groupId> 
<artifactId>yelp-fusion-client</artifactId>
<version>0.1.3</version>
</dependency>

results in the following Maven error:

The following artifacts could not be resolved: io.github.ranga543:yelp-fusion-client:jar:0.1.2, com.android.support:appcompat-v7:jar:25.1.1: Failure to find io.github.ranga543:yelp-fusion-client:jar:0.1.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Dependency:

<dependency>
<groupId>io.github.ranga543</groupId>
<artifactId>yelp-fusion-client</artifactId>
<version>0.1.3</version>
<type>pom</type>
</dependency>

results in:

Failure to find com.android.support:appcompat-v7:jar:25.1.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

Version 0.1.3 and 0.1.2 both result in the same errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.