2828 author = "Maksym Novozhylov <mnovozhilov@upwork.com>" ,
2929 date = "6/4/2014" ,
3030 currentRevision = 1 ,
31- lastModified = "6/4 /2014" ,
31+ lastModified = "24/5 /2014" ,
3232 lastModifiedBy = "Maksym Novozhylov" ,
3333 reviewers = {"Yiota Tsakiri" }
3434)
@@ -43,56 +43,16 @@ public Snapshot(OAuthClient client) {
4343 oClient .setEntryPoint (ENTRY_POINT );
4444 }
4545
46- /**
47- * Get snapshot info
48- *
49- * @param company Company
50- * @param username Username
51- * @param ts Timestamp
52- * @throws JSONException If error occurred
53- * @return {@link JSONObject}
54- */
55- public JSONObject get (String company , String username , String ts ) throws JSONException {
56- return oClient .get ("/team/v1/snapshots/" + company + "/" + username + "/" + ts );
57- }
58-
59- /**
60- * Update snapshot
61- *
62- * @param company Company
63- * @param username Username
64- * @param ts Timestamp
65- * @param params Parameters
66- * @throws JSONException If error occurred
67- * @return {@link JSONObject}
68- */
69- public JSONObject update (String company , String username , String ts , HashMap <String , String > params ) throws JSONException {
70- return oClient .put ("/team/v1/snapshots/" + company + "/" + username + "/" + ts , params );
71- }
72-
73- /**
74- * Delete snapshot
75- *
76- * @param company Company
77- * @param username Username
78- * @param ts Timestamp
79- * @throws JSONException If error occurred
80- * @return {@link JSONObject}
81- */
82- public JSONObject delete (String company , String username , String ts ) throws JSONException {
83- return oClient .delete ("/team/v1/snapshots/" + company + "/" + username + "/" + ts );
84- }
85-
8646 /**
8747 * Get snapshot info by specific contract
8848 *
8949 * @param contractId Contract ID
9050 * @param ts Timestamp
9151 * @throws JSONException If error occurred
92- * @return {@link JSONObject}
52+ * @return {@link JSONObject}
9353 */
9454 public JSONObject getByContract (String contractId , String ts ) throws JSONException {
95- return oClient .get ("/team/v2 /snapshots/contracts/" + contractId + "/" + ts );
55+ return oClient .get ("/team/v3 /snapshots/contracts/" + contractId + "/" + ts );
9656 }
9757
9858 /**
@@ -102,10 +62,10 @@ public JSONObject getByContract(String contractId, String ts) throws JSONExcepti
10262 * @param ts Timestamp
10363 * @param params Parameters
10464 * @throws JSONException If error occurred
105- * @return {@link JSONObject}
65+ * @return {@link JSONObject}
10666 */
10767 public JSONObject updateByContract (String contractId , String ts , HashMap <String , String > params ) throws JSONException {
108- return oClient .put ("/team/v2 /snapshots/contracts/" + contractId + "/" + ts , params );
68+ return oClient .put ("/team/v3 /snapshots/contracts/" + contractId + "/" + ts , params );
10969 }
11070
11171 /**
@@ -114,10 +74,10 @@ public JSONObject updateByContract(String contractId, String ts, HashMap<String,
11474 * @param contractId Contract ID
11575 * @param ts Timestamp
11676 * @throws JSONException If error occurred
117- * @return {@link JSONObject}
77+ * @return {@link JSONObject}
11878 */
11979 public JSONObject deleteByContract (String contractId , String ts ) throws JSONException {
120- return oClient .delete ("/team/v2 /snapshots/contracts/" + contractId + "/" + ts );
80+ return oClient .delete ("/team/v3 /snapshots/contracts/" + contractId + "/" + ts );
12181 }
12282
12383}
0 commit comments