Android Open Source - UTHPortal-Android-Gradle Api Links






From Project

Back to project page UTHPortal-Android-Gradle.

License

The source code is released under:

MIT License

If you think the Android project UTHPortal-Android-Gradle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.uth.uthportal.network;
/*  ww w.  j a  v a2s . co m*/
import com.uth.uthportal.collections.AvailableCourse;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
 * Provides static methods to get links for JSON files.
 * @author GeorgeT
 *
 */
public class ApiLinks {
  private static final String Food = "/uth/foodmenu";
  private static final String rootLink = "http://sfi.ddns.net/uthportal";
  private static final String coursesLink = "/inf/courses/";
  private static final String generalAnnLink = "/inf/announce/genannounce";
    private static final String allCoursesLink = "/inf/courses";
  
  //gets lists of courses and provides a map of their names to the download links for them
  public static HashMap<String,String> getCoursesLinks(List<String> prefCourses){
    if (prefCourses == null) return null;
    HashMap<String,String> linksMap = new HashMap<String, String>();
    for(String course : prefCourses){
      linksMap.put(course, getCourseLink(course));
    }
    return linksMap;
  }

    private static String getCourseLink(String courseName){
        return rootLink + coursesLink + courseName;
    }
    public static String getAvailableCoursesLink(){
        return rootLink + allCoursesLink;
    }
  public static String getFoodLink(){
    return rootLink + Food;
  }
  public static String getGeneralAnnLink(){
    return rootLink + generalAnnLink;
  }


}




Java Source Code List

com.uth.uthportal.AboutScreen.java
com.uth.uthportal.CoursesFragment.java
com.uth.uthportal.DepartmentFragment.java
com.uth.uthportal.FoodFragment.java
com.uth.uthportal.MainScreen.java
com.uth.uthportal.SettingsScreen.java
com.uth.uthportal.adapter.AdapterManager.java
com.uth.uthportal.adapter.AdapterProvider.java
com.uth.uthportal.adapter.ExpandableListAdapter.java
com.uth.uthportal.adapter.SettingsAdapter.java
com.uth.uthportal.adapter.TabsPagerAdapter.java
com.uth.uthportal.buffers.AvailableCoursesParser.java
com.uth.uthportal.buffers.CoursesParser.java
com.uth.uthportal.buffers.FileOperation.java
com.uth.uthportal.buffers.FoodParser.java
com.uth.uthportal.buffers.GeneralAnnParser.java
com.uth.uthportal.buffers.SettingsManager.java
com.uth.uthportal.collections.AnnItem.java
com.uth.uthportal.collections.Announcements.java
com.uth.uthportal.collections.AvailableCourse.java
com.uth.uthportal.collections.CourseInfo.java
com.uth.uthportal.collections.Course.java
com.uth.uthportal.collections.DayMenu.java
com.uth.uthportal.collections.DefaultIntervals.java
com.uth.uthportal.collections.Dish.java
com.uth.uthportal.collections.Food.java
com.uth.uthportal.collections.GeneralAnnouncement.java
com.uth.uthportal.collections.Settings.java
com.uth.uthportal.network.ApiLinks.java
com.uth.uthportal.network.AppRater.java
com.uth.uthportal.network.AsyncJSONDownloader.java
com.uth.uthportal.network.JSONDownloader.java
com.uth.uthportal.service.DataSyncService.java
com.uth.uthportal.util.SystemUiHiderBase.java
com.uth.uthportal.util.SystemUiHiderHoneycomb.java
com.uth.uthportal.util.SystemUiHider.java