use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.
the class RecentSnapsFragment method getRecentSnaps.
private void getRecentSnaps(boolean bMore) {
Map<String, String> params = new HashMap<String, String>();
if (bMore && m_snapsCurrentPage > 0) {
params.put("page", String.valueOf(m_snapsCurrentPage));
m_bAppendMode = true;
} else {
m_bAppendMode = false;
}
GlitchRequest request = m_application.glitch.getRequest("snaps.getRecent", params);
request.execute(this);
m_requestCount = 1;
((HomeScreen) getActivity()).showSpinner(true);
}
use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.
the class ProfileFragment method getProfileInfo.
public void getProfileInfo(boolean bMore) {
String selfPlayerID = ((HomeScreen) getActivity()).getPlayerID();
Map<String, String> params = new HashMap<String, String>();
params.put("player_tsid", m_playerTsid);
if (m_playerTsid != selfPlayerID)
params.put("viewer_tsid", selfPlayerID);
// params.put("cat", "skill_learned" );
if (bMore && m_actItemLast != null) {
params.put("last", m_actItemLast);
m_bAppendMode = true;
} else
m_bAppendMode = false;
if (m_currentActType == ActivityFragment.ACTIVITY_TYPE_UPDATES)
params.put("cat", "notes");
GlitchRequest request1 = m_application.glitch.getRequest("activity.playerFeed", params);
request1.execute(this);
GlitchRequest request2 = m_application.glitch.getRequest("skills.listLearning");
request2.execute(this);
GlitchRequest request3 = m_application.glitch.getRequest("players.fullInfo", params);
request3.execute(this);
GlitchRequest request4 = m_application.glitch.getRequest("skills.listUnlearning");
request4.execute(this);
m_requestCount = 4;
((HomeScreen) getActivity()).showSpinner(true);
}
use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.
the class ProfileFragment method AddOrRemoveFriend.
private void AddOrRemoveFriend(boolean bRemove, String player) {
Map<String, String> params = new HashMap<String, String>();
params.put("tsid", player);
String command = bRemove ? "friends.remove" : "friends.add";
GlitchRequest request0 = m_application.glitch.getRequest(command, params);
request0.execute(this);
m_requestCount = 1;
((HomeScreen) getActivity()).showSpinner(true);
}
use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.
the class EncyclopediaLocationHubsFragment method getEncyclopediaLocationHubs.
private void getEncyclopediaLocationHubs() {
if (m_application != null) {
GlitchRequest request = m_application.glitch.getRequest("locations.getHubs");
request.execute(this);
m_requestCount = 1;
((HomeScreen) getActivity()).showSpinner(true);
}
}
use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.
the class MailComposeFragment method sendMail.
private void sendMail() {
Map<String, String> params = new HashMap<String, String>();
params.put("recipient", m_recipientTsid);
params.put("message", m_composer.getText().toString());
if (m_inReplyTo > 0) {
params.put("in_reply_to", String.valueOf(m_inReplyTo));
}
GlitchRequest request = m_application.glitch.getRequest("mail.sendMessage", params);
request.execute(this);
m_requestCount = 1;
((HomeScreen) getActivity()).showSpinner(true);
}
Aggregations