Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
dylan.weening
dylan.weening's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Code Errors
[2 Replies]
03-Dec-2012 09:27 PM
Forum:
Programming Questions
I am new and doing a tutorial right now. This is the code that is given, but unfortunately I am receiving the error "unexpected token: void" at my line "void setup()"... Here is my code below:
import org.json.*;
String apiKey = "<imagine_a_key_here>"
String baseURL = "http://api.nytimes.com/svc/search/v1/article"
void setup(){
getOJArticles(); //THE METHOD GETS CALLED HERE
};
void draw() {
};
void getOJArticles() {
String request = baseURL + "?query=O.J.+Simpson&begin_date=19940101&end_date=19960101&api-key=" + apiKey;
String result = join( loadStrings( request ), "");
println( result );
};
«Prev
Next »
Moderate user : dylan.weening
Forum