all repos — tmdb-desktop-client @ 0cc74df861e68ba5695766c635a6f0058bf90966

A simple tmdb desktop client written in Java

Remove temporary test files
prithugoswami prithugoswami524@gmail.com
Tue, 30 Apr 2019 19:56:12 +0530
commit

0cc74df861e68ba5695766c635a6f0058bf90966

parent

eaf34cc543a99fdb2ddbd59a9af1b3623f23a7bb

4 files changed, 1 insertions(+), 90 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,1 +1,2 @@

*.class +/.test
D test.java

@@ -1,32 +0,0 @@

-import java.net.URL; - -import java.net.MalformedURLException; -import java.io.IOException; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.InputStream; -import org.json.*; - - -class test{ - public static void main(String args[]){ - try{ - String word = "farrago"; - String req_url = ( - "https://googledictionaryapi.eu-gb.mybluemix.net/?define=%s&lang=en" - ); - URL url = new URL(String.format(req_url, word)); - InputStream res = (InputStream)url.getContent(); - JSONArray ja = new JSONArray(new JSONTokener(res)); - System.out.println(ja.toString(4)); - - } - catch(MalformedURLException e){ - System.out.println(e); - } - catch(IOException e){ - System.out.println(e); - } - - } -}
D testUI.java

@@ -1,17 +0,0 @@

-import javax.swing.*; - -public class testUI { - - public static void main(String [] args){ - - JFrame f1=new JFrame(); - JButton b1=new JButton("BEGIN"); - b1.setBounds(230,200,100,40); - f1.add(b1); - f1.setSize(400,500); - f1.setLayout(null); - f1.setVisible(true); - - } -} -
D tmdb.java

@@ -1,41 +0,0 @@

-import java.net.URL; -import java.net.MalformedURLException; -import java.io.IOException; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.InputStream; -import org.json.*; -import javax.swing.*; - -public class tmdb{ - static String api_key="b888b64c9155c26ade5659ea4dd60e64"; //TMDB API KEY - static String a_url="https://api.themoviedb.org/4/"; //ROOT URL FOR TMDB API - - public static void main(String [] args){ - try{ - - // } - // catch{ - // { - // } - //} - - //static void search(String mov){ //function for searching a movie - String s_url=a_url+"search/movie?api_key="+api_key+"&query=%s"; //General URL format for finding a movie - String url=String.format(s_url,"CARS"); //Adding the query - URL us1 = new URL(url); //Creating url object - InputStream sres = (InputStream)us1.getContent(); //Storing the stream of data we get from the url - JSONArray ja = new JSONArray(new JSONTokener(sres)); - System.out.println(ja.toString(4)); - } - catch(MalformedURLException e){ - System.out.println(e); - } - catch(IOException e){ - System.out.println(e); - } - - - } -} -