public AlbumClientier getSettings(OnOk onOk, OnError onErr) { Task.Run(() => { try { AnsonHeader header = client .Header() .UsrAct("album.c#", "profile", "r/settings", "load profile"); AlbumReq req = new AlbumReq(uri); req.A(A.getPrefs); AnsonMsg q = client .UserReq(uri, new AlbumPort(AlbumPort.album), null, req) .Header(header); client.CommitAsync(q, onOk, onErr); } catch (Exception e) { onErr.err(new MsgCode(MsgCode.exIo), string.Format("%s\n%s", e.GetType().Name, e.Message)); } }); return(this); }
public string download(Photo photo, string localpath) { AlbumReq req = new AlbumReq(uri).download(photo); req.A(A.download); return(client.download(uri, new AlbumPort(AlbumPort.album), req, localpath)); }
public AlbumResp getCollect(string collectId) { AlbumReq req = new AlbumReq(uri).CollectId("c-001"); req.A(A.collect); AnsonMsg q = client.UserReq(uri, new AlbumPort(AlbumPort.album), null, req); return((AlbumResp)client.Commit(q, errCtx)); }
public AlbumResp insertPhoto(string collId, string fullpath, string clientname) { AlbumReq req = new AlbumReq(uri) .createPhoto(collId, fullpath) .photoName(clientname); req.A(A.insertPhoto); AnsonHeader header = client.Header().act("album.c#", "create", "c/photo", "create photo"); AnsonMsg q = client.UserReq(uri, new AlbumPort(AlbumPort.album), req) .Header(header); return((AlbumResp)client.Commit(q, errCtx)); }