Exemple #1
0
 public LinkedNotebook CreateLinkedNotebook(LinkedNotebook linkedNotebook)
 {
     lock (this)
         using (var httpClient = GetHttpClient())
         {
             return GetNoteStoreClient(httpClient).createLinkedNotebook(this.authToken, linkedNotebook);
         }
 }
		internal static ENLinkedNotebookRef LinkedNotebookRefFromLinkedNotebook(LinkedNotebook linkedNotebook)
		{
			ENLinkedNotebookRef linkedNotebookRef = new ENLinkedNotebookRef();
			linkedNotebookRef.Guid = linkedNotebook.Guid;
			linkedNotebookRef.NoteStoreUrl = linkedNotebook.NoteStoreUrl;
			linkedNotebookRef.ShardId = linkedNotebook.ShardId;
			linkedNotebookRef.SharedNotebookGlobalId = linkedNotebook.ShareKey;
			return linkedNotebookRef;
		}
		internal ENNoteStoreClient NoteStoreForLinkedNotebook(LinkedNotebook linkedNotebook)
		{
			ENLinkedNotebookRef linkedNotebookRef = ENLinkedNotebookRef.LinkedNotebookRefFromLinkedNotebook(linkedNotebook);
			ENLinkedNoteStoreClient linkedClient = (EvernoteSDK.ENLinkedNoteStoreClient)ENLinkedNoteStoreClient.NoteStoreClientForLinkedNotebookRef(linkedNotebookRef);
			linkedClient.DelegateObj = (EvernoteSDK.ENLinkedNoteStoreClient.IENLinkedNoteStoreClient)this;
			return linkedClient;
		}
Exemple #4
0
 public LinkedNotebook UpdateLinkedNotebook(LinkedNotebook ln)
 {
     lock (this)
         using (var httpClient = GetHttpClient())
         {
             return GetNoteStoreClient(httpClient).updateLinkedNotebook(this.authToken, ln);
         }
 }
			///** Asks the service to update a linked notebook.
			// @param  linkedNotebook Updates the name of a linked notebook.
			// */
			public int UpdateLinkedNotebook(LinkedNotebook linkedNotebook)
			{
				return Client.updateLinkedNotebook(AuthenticationToken(), linkedNotebook);
			}
			///** Asks the service to make a linked notebook with the provided name, username of the owner and identifiers provided.
			// A linked notebook can be either a link to a public notebook or to a private shared notebook.
			// @param  linkedNotebook The desired fields for the linked notebook must be provided on this object. The name of the linked notebook must be set. Either a username uri or a shard id and share key must be provided otherwise a EDAMUserException is thrown.
			// */
			public LinkedNotebook CreateLinkedNotebook(LinkedNotebook linkedNotebook)
			{
				return Client.createLinkedNotebook(AuthenticationToken(), linkedNotebook);
			}
			///** Asks the NoteStore to provide information about the contents of a linked notebook that has been shared with the caller, or that is public to the world.
			// This will return a result that is similar to getSyncChunk, but will only contain entries that are visible to the caller. I.e. only that particular Notebook will be visible, along with its Notes, and Tags on those Notes.
			// This function must be called on the shard that owns the referenced notebook. (I.e. the shardId in /shard/shardId/edam/note must be the same as LinkedNotebook.shardId.)
			// @param  linkedNotebook This structure should contain identifying information and permissions to access the notebook in question. This must contain the valid fields for either a shared notebook (e.g. shareKey) or a public notebook (e.g. username, uri)
			// @param  afterUSN The client can pass this value to ask only for objects that have been updated after a certain point. This allows the client to receive updates after its last checkpoint rather than doing a full synchronization on every pass. The default value of "0" indicates that the client wants to get objects from the start of the account.
			// @param  maxEntries The maximum number of modified objects that should be returned in the result SyncChunk. This can be used to limit the size of each individual message to be friendly for network transfer. Applications should not request more than 256 objects at a time, and must handle the case where the service returns less than the requested number of objects in a given request even though more objects are available on the service.
			// @param  fullSyncOnly If true, then the client only wants initial data for a full sync. In this case, the service will not return any expunged objects, and will not return any Resources, since these are also provided in their corresponding Notes.
			// */
			public object GetLinkedNotebookSyncChunk(LinkedNotebook linkedNotebook, int afterUSN, int maxEntries, bool fullSyncOnly)
			{
				return Client.getLinkedNotebookSyncChunk(AuthenticationToken(), linkedNotebook, afterUSN, maxEntries, fullSyncOnly);
			}
			///** Asks the NoteStore to provide information about the status of a linked notebook that has been shared with the caller, or that is public to the world.
			// This will return a result that is similar to getSyncState, but may omit SyncState.uploaded if the caller doesn't have permission to write to the linked notebook.
			// This function must be called on the shard that owns the referenced notebook. (I.e. the shardId in /shard/shardId/edam/note must be the same as LinkedNotebook.shardId.)
			// @param  linkedNotebook This structure should contain identifying information and permissions to access the notebook in question.
			// */
			public SyncState GetLinkedNotebookSyncState(LinkedNotebook linkedNotebook)
			{
				return Client.getLinkedNotebookSyncState(AuthenticationToken(), linkedNotebook);
			}
			///**
			// *  Every linked notebook requires its own note store client instance to access.
			// *
			// *  @param linkedNotebook A linked notebook record for which you'd like a note store client.
			// *
			// *  @return A client for the linked notebook's note store.
			// */
			new public ENNoteStoreClient NoteStoreForLinkedNotebook(LinkedNotebook linkedNotebook)
			{
				return base.NoteStoreForLinkedNotebook(linkedNotebook);
			}
		// Constructor for a Business notebook
		internal ENNotebook(Notebook notebook, SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook)
		{
			this.Notebook = notebook;
			this.SharedNotebook = sharedNotebook;
			this.LinkedNotebook = linkedNotebook;
		}
		// Constructor for a Public notebook
		internal ENNotebook(Notebook publicNotebook, LinkedNotebook linkedNotebook)
		{
			this.Notebook = publicNotebook;
			this.SharedNotebook = null;
			this.LinkedNotebook = linkedNotebook;
		}
		// Constructor for a Linked notebook
		internal ENNotebook(SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook)
		{
			this.Notebook = null;
			this.SharedNotebook = sharedNotebook;
			this.LinkedNotebook = linkedNotebook;
		}
		// Constructor for a Business notebook
		internal ENNotebook(Notebook notebook, SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook)
		{
			Notebook = notebook;
			SharedNotebook = sharedNotebook;
			LinkedNotebook = linkedNotebook;
		}
		// Constructor for a Public notebook
		internal ENNotebook(Notebook publicNotebook, LinkedNotebook linkedNotebook)
		{
			Notebook = publicNotebook;
			SharedNotebook = null;
			LinkedNotebook = linkedNotebook;
		}
		// Constructor for a Linked notebook
		internal ENNotebook(SharedNotebook sharedNotebook, LinkedNotebook linkedNotebook)
		{
			Notebook = null;
			SharedNotebook = sharedNotebook;
			LinkedNotebook = linkedNotebook;
		}