コード例 #1
0
  public String setGradeURL() {
    String request = "";
    setResources("setGrade");

    request = "/" + getResources();
    request = ApplicationSettings.EdmodoAPIBase + request;
    return request;
  }
コード例 #2
0
  public String createTurninURL() {
    String request = "";
    setResources("turnInAssignment");

    request = "/" + getResources();
    request = ApplicationSettings.EdmodoAPIBase + request;
    return request;
  }
コード例 #3
0
  public String launchRequest(String launchKey) {

    String request = "";
    setResources("launchRequests");

    request = "/" + getResources() + "?" + "api_key=" + getApi_key() + "&launch_key=" + launchKey;
    request = ApplicationSettings.EdmodoAPIBase + request;

    return request;
  }
コード例 #4
0
  /*
   * GET /profiles?api_key=<API_KEY>&access_token=<ACCESS_TOKEN>&user_tokens=["b020c42d1"]
   */
  public String getProfile(List<String> userTokens) {

    String request = "";
    setResources("profiles");

    Gson gson = new Gson();
    String userTokensJson = gson.toJson(userTokens);

    request =
        "/"
            + getResources()
            + "?"
            + "api_key="
            + getApi_key()
            + "&access_token="
            + getAccess_token()
            + "&user_tokens="
            + userTokensJson;
    request = ApplicationSettings.EdmodoAPIBase + request;
    return request;
  }
コード例 #5
0
  // GET /groups?api_key=<API_KEY>&access_token=<ACCESS_TOKEN>&group_ids=[379557,379562]
  public String getGroupsInfo(List<Long> groups) {
    String request = "";

    setResources("groups");
    Gson gson = new Gson();
    String groupJson = gson.toJson(groups);
    // System.out.println(groupJson);

    request =
        "/"
            + getResources()
            + "?"
            + "api_key="
            + getApi_key()
            + "&access_token="
            + getAccess_token()
            + "&group_ids="
            + groupJson;
    request = ApplicationSettings.EdmodoAPIBase + request;

    return request;
  }
コード例 #6
0
  // GET /members?api_key=<API_KEY>&access_token=<ACCESS_TOKEN>&group_id=379557,456322
  public String getMembers(List<Long> groups) {
    String request = "";

    setResources("members");

    Gson gson = new Gson();
    String groupJson = gson.toJson(groups);
    groupJson = groupJson.substring(1, groupJson.length() - 1);
    // System.out.println(groupJson);

    request =
        "/"
            + getResources()
            + "?"
            + "api_key="
            + getApi_key()
            + "&access_token="
            + getAccess_token()
            + "&group_id="
            + groupJson;
    request = ApplicationSettings.EdmodoAPIBase + request;

    return request;
  }