Skip to content

Commit

Permalink
Evernote API version 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Hitchings committed Aug 25, 2012
1 parent b6e41a2 commit f6aa64b
Show file tree
Hide file tree
Showing 9 changed files with 1,105 additions and 94 deletions.
3 changes: 3 additions & 0 deletions src/Evernote/EDAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<Compile Include="EDAM\NoteStore\SyncChunk.cs" />
<Compile Include="EDAM\NoteStore\SyncChunkFilter.cs" />
<Compile Include="EDAM\NoteStore\SyncState.cs" />
<Compile Include="EDAM\NoteStore\RelatedQuery.cs" />
<Compile Include="EDAM\NoteStore\RelatedResult.cs" />
<Compile Include="EDAM\NoteStore\RelatedResultSpec.cs" />
<Compile Include="EDAM\Type\Accounting.cs" />
<Compile Include="EDAM\Type\Ad.cs" />
<Compile Include="EDAM\Type\Constants.cs" />
Expand Down
6 changes: 6 additions & 0 deletions src/Evernote/EDAM/Limits/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ public class Constants
public static string EDAM_CONTENT_CLASS_HELLO_ENCOUNTER = "evernote.hello.encounter";
public static string EDAM_CONTENT_CLASS_HELLO_PROFILE = "evernote.hello.profile";
public static string EDAM_CONTENT_CLASS_FOOD_MEAL = "evernote.food.meal";
public static string EDAM_CONTENT_CLASS_SKITCH = "evernote.skitch";
public static int EDAM_RELATED_PLAINTEXT_LEN_MIN = 1;
public static int EDAM_RELATED_PLAINTEXT_LEN_MAX = 131072;
public static int EDAM_RELATED_MAX_NOTES = 25;
public static int EDAM_RELATED_MAX_NOTEBOOKS = 1;
public static int EDAM_RELATED_MAX_TAGS = 25;
static Constants()
{
EDAM_MIME_TYPES.Add("image/gif");
Expand Down
628 changes: 536 additions & 92 deletions src/Evernote/EDAM/NoteStore/NoteStore.cs

Large diffs are not rendered by default.

136 changes: 136 additions & 0 deletions src/Evernote/EDAM/NoteStore/RelatedQuery.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Transport;
namespace Evernote.EDAM.NoteStore
{

#if !SILVERLIGHT && !NETFX_CORE
[Serializable]
#endif
public partial class RelatedQuery : TBase
{
private string _noteGuid;
private string _plainText;

public string NoteGuid
{
get
{
return _noteGuid;
}
set
{
__isset.noteGuid = true;
this._noteGuid = value;
}
}

public string PlainText
{
get
{
return _plainText;
}
set
{
__isset.plainText = true;
this._plainText = value;
}
}


public Isset __isset;
#if !SILVERLIGHT && !NETFX_CORE
[Serializable]
#endif
public struct Isset {
public bool noteGuid;
public bool plainText;
}

public RelatedQuery() {
}

public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.String) {
NoteGuid = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.String) {
PlainText = iprot.ReadString();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}

public void Write(TProtocol oprot) {
TStruct struc = new TStruct("RelatedQuery");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (NoteGuid != null && __isset.noteGuid) {
field.Name = "noteGuid";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(NoteGuid);
oprot.WriteFieldEnd();
}
if (PlainText != null && __isset.plainText) {
field.Name = "plainText";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(PlainText);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}

public override string ToString() {
StringBuilder sb = new StringBuilder("RelatedQuery(");
sb.Append("NoteGuid: ");
sb.Append(NoteGuid);
sb.Append(",PlainText: ");
sb.Append(PlainText);
sb.Append(")");
return sb.ToString();
}

}

}
222 changes: 222 additions & 0 deletions src/Evernote/EDAM/NoteStore/RelatedResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Transport;
namespace Evernote.EDAM.NoteStore
{

#if !SILVERLIGHT && !NETFX_CORE
[Serializable]
#endif
public partial class RelatedResult : TBase
{
private List<Evernote.EDAM.Type.Note> _notes;
private List<Evernote.EDAM.Type.Notebook> _notebooks;
private List<Evernote.EDAM.Type.Tag> _tags;

public List<Evernote.EDAM.Type.Note> Notes
{
get
{
return _notes;
}
set
{
__isset.notes = true;
this._notes = value;
}
}

public List<Evernote.EDAM.Type.Notebook> Notebooks
{
get
{
return _notebooks;
}
set
{
__isset.notebooks = true;
this._notebooks = value;
}
}

public List<Evernote.EDAM.Type.Tag> Tags
{
get
{
return _tags;
}
set
{
__isset.tags = true;
this._tags = value;
}
}


public Isset __isset;
#if !SILVERLIGHT && !NETFX_CORE
[Serializable]
#endif
public struct Isset {
public bool notes;
public bool notebooks;
public bool tags;
}

public RelatedResult() {
}

public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.List) {
{
Notes = new List<Evernote.EDAM.Type.Note>();
TList _list103 = iprot.ReadListBegin();
for( int _i104 = 0; _i104 < _list103.Count; ++_i104)
{
Evernote.EDAM.Type.Note _elem105 = new Evernote.EDAM.Type.Note();
_elem105 = new Evernote.EDAM.Type.Note();
_elem105.Read(iprot);
Notes.Add(_elem105);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.List) {
{
Notebooks = new List<Evernote.EDAM.Type.Notebook>();
TList _list106 = iprot.ReadListBegin();
for( int _i107 = 0; _i107 < _list106.Count; ++_i107)
{
Evernote.EDAM.Type.Notebook _elem108 = new Evernote.EDAM.Type.Notebook();
_elem108 = new Evernote.EDAM.Type.Notebook();
_elem108.Read(iprot);
Notebooks.Add(_elem108);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.List) {
{
Tags = new List<Evernote.EDAM.Type.Tag>();
TList _list109 = iprot.ReadListBegin();
for( int _i110 = 0; _i110 < _list109.Count; ++_i110)
{
Evernote.EDAM.Type.Tag _elem111 = new Evernote.EDAM.Type.Tag();
_elem111 = new Evernote.EDAM.Type.Tag();
_elem111.Read(iprot);
Tags.Add(_elem111);
}
iprot.ReadListEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}

public void Write(TProtocol oprot) {
TStruct struc = new TStruct("RelatedResult");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Notes != null && __isset.notes) {
field.Name = "notes";
field.Type = TType.List;
field.ID = 1;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Notes.Count));
foreach (Evernote.EDAM.Type.Note _iter112 in Notes)
{
_iter112.Write(oprot);
oprot.WriteListEnd();
}
}
oprot.WriteFieldEnd();
}
if (Notebooks != null && __isset.notebooks) {
field.Name = "notebooks";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Notebooks.Count));
foreach (Evernote.EDAM.Type.Notebook _iter113 in Notebooks)
{
_iter113.Write(oprot);
oprot.WriteListEnd();
}
}
oprot.WriteFieldEnd();
}
if (Tags != null && __isset.tags) {
field.Name = "tags";
field.Type = TType.List;
field.ID = 3;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, Tags.Count));
foreach (Evernote.EDAM.Type.Tag _iter114 in Tags)
{
_iter114.Write(oprot);
oprot.WriteListEnd();
}
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}

public override string ToString() {
StringBuilder sb = new StringBuilder("RelatedResult(");
sb.Append("Notes: ");
sb.Append(Notes);
sb.Append(",Notebooks: ");
sb.Append(Notebooks);
sb.Append(",Tags: ");
sb.Append(Tags);
sb.Append(")");
return sb.ToString();
}

}

}
Loading

0 comments on commit f6aa64b

Please sign in to comment.