From 1cf8af6a0b7f633c8fddeaf8b2bf27da407032aa Mon Sep 17 00:00:00 2001 From: Thomas Van Machelen Date: Sat, 20 Jan 2007 11:35:42 +0000 Subject: [PATCH] Initial check-in svn path=/trunk/upcoming-sharp/; revision=71389 --- AUTHORS | 1 + COPYING | 21 + ChangeLog | 0 INSTALL | 1 + Makefile.am | 2 + NEWS | 0 README | 24 + autogen.sh | 4 + config.guess | 1 + config.sub | 1 + configure.ac | 54 +++ doc/Makefile.am | 47 ++ doc/Mono.Upcoming.source | 4 + doc/Mono.Upcoming/Mono.Upcoming.xml | 6 + .../Mono.Upcoming/AttendStatus.xml | 46 ++ .../Mono.Upcoming/AuthenticatedConnection.xml | 320 +++++++++++++ doc/Mono.Upcoming/Mono.Upcoming/Category.xml | 74 +++ .../Mono.Upcoming/ConnectionWrapper.xml | 69 +++ doc/Mono.Upcoming/Mono.Upcoming/Country.xml | 87 ++++ doc/Mono.Upcoming/Mono.Upcoming/Event.xml | 444 ++++++++++++++++++ doc/Mono.Upcoming/Mono.Upcoming/Group.xml | 243 ++++++++++ doc/Mono.Upcoming/Mono.Upcoming/Metro.xml | 116 +++++ doc/Mono.Upcoming/Mono.Upcoming/Response.xml | 207 ++++++++ doc/Mono.Upcoming/Mono.Upcoming/State.xml | 116 +++++ doc/Mono.Upcoming/Mono.Upcoming/Status.xml | 46 ++ doc/Mono.Upcoming/Mono.Upcoming/Token.xml | 90 ++++ .../Mono.Upcoming/UpcomingConnection.xml | 220 +++++++++ .../Mono.Upcoming/UpcomingException.xml | 29 ++ .../Mono.Upcoming/UpcomingParam.xml | 55 +++ doc/Mono.Upcoming/Mono.Upcoming/User.xml | 146 ++++++ doc/Mono.Upcoming/Mono.Upcoming/Venue.xml | 351 ++++++++++++++ doc/Mono.Upcoming/Mono.Upcoming/Watch.xml | 87 ++++ doc/Mono.Upcoming/index.xml | 30 ++ examples/Authenticated.cs | 32 ++ examples/Makefile.am | 14 + examples/SearchEvents.cs | 27 ++ src/Makefile.am | 35 ++ src/Mono.Upcoming/AssemblyInfo.cs | 36 ++ src/Mono.Upcoming/AssemblyInfo.cs.in | 36 ++ src/Mono.Upcoming/AuthenticatedConnection.cs | 271 +++++++++++ src/Mono.Upcoming/Category.cs | 16 + src/Mono.Upcoming/ConnectionWrapper.cs | 21 + src/Mono.Upcoming/Country.cs | 25 + src/Mono.Upcoming/Event.cs | 148 ++++++ src/Mono.Upcoming/Group.cs | 58 +++ src/Mono.Upcoming/Metro.cs | 29 ++ src/Mono.Upcoming/Response.cs | 49 ++ src/Mono.Upcoming/State.cs | 35 ++ src/Mono.Upcoming/Token.cs | 19 + src/Mono.Upcoming/UpcomingConnection.cs | 192 ++++++++ src/Mono.Upcoming/UpcomingParam.cs | 27 ++ src/Mono.Upcoming/UpcomingUtil.cs | 138 ++++++ src/Mono.Upcoming/User.cs | 47 ++ src/Mono.Upcoming/Venue.cs | 99 ++++ src/Mono.Upcoming/Watch.cs | 29 ++ src/mono-upcoming.pc.in | 8 + 56 files changed, 4333 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 120000 INSTALL create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100755 autogen.sh create mode 120000 config.guess create mode 120000 config.sub create mode 100644 configure.ac create mode 100644 doc/Makefile.am create mode 100644 doc/Mono.Upcoming.source create mode 100644 doc/Mono.Upcoming/Mono.Upcoming.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/AttendStatus.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/AuthenticatedConnection.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Category.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/ConnectionWrapper.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Country.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Event.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Group.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Metro.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Response.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/State.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Status.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Token.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/UpcomingConnection.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/UpcomingException.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/UpcomingParam.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/User.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Venue.xml create mode 100644 doc/Mono.Upcoming/Mono.Upcoming/Watch.xml create mode 100644 doc/Mono.Upcoming/index.xml create mode 100644 examples/Authenticated.cs create mode 100644 examples/Makefile.am create mode 100644 examples/SearchEvents.cs create mode 100644 src/Makefile.am create mode 100644 src/Mono.Upcoming/AssemblyInfo.cs create mode 100644 src/Mono.Upcoming/AssemblyInfo.cs.in create mode 100644 src/Mono.Upcoming/AuthenticatedConnection.cs create mode 100644 src/Mono.Upcoming/Category.cs create mode 100644 src/Mono.Upcoming/ConnectionWrapper.cs create mode 100644 src/Mono.Upcoming/Country.cs create mode 100644 src/Mono.Upcoming/Event.cs create mode 100644 src/Mono.Upcoming/Group.cs create mode 100644 src/Mono.Upcoming/Metro.cs create mode 100644 src/Mono.Upcoming/Response.cs create mode 100644 src/Mono.Upcoming/State.cs create mode 100644 src/Mono.Upcoming/Token.cs create mode 100644 src/Mono.Upcoming/UpcomingConnection.cs create mode 100644 src/Mono.Upcoming/UpcomingParam.cs create mode 100644 src/Mono.Upcoming/UpcomingUtil.cs create mode 100644 src/Mono.Upcoming/User.cs create mode 100644 src/Mono.Upcoming/Venue.cs create mode 100644 src/Mono.Upcoming/Watch.cs create mode 100644 src/mono-upcoming.pc.in diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..ba05376 --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Thomas Van Machelen diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..1231a6e --- /dev/null +++ b/COPYING @@ -0,0 +1,21 @@ +Copyright (c) 2007 Novell, Inc. and the individuals listed +on the ChangeLog entries. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/INSTALL b/INSTALL new file mode 120000 index 0000000..81fa6ff --- /dev/null +++ b/INSTALL @@ -0,0 +1 @@ +/usr/share/automake-1.9/INSTALL \ No newline at end of file diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..ad753f6 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS=src examples doc + diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..d44ba99 --- /dev/null +++ b/README @@ -0,0 +1,24 @@ +Last updated: 2007-01-19 + +README for upcoming-sharp +--------------------------- +upcoming-sharp is a .NET library that lets you log in to upcoming.org and use +their services programmatically. + +You can get your watchlist, add and edit events, get venue information,... + + +* Directory Layout +------------------ + + docs/ + Monodoc documentation for the library + + sample/ + Sample programs using the library + + src/ + Source files for the library + +Maintainer: thomas.vanmachelen@gmail.com + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..98a4e8a --- /dev/null +++ b/autogen.sh @@ -0,0 +1,4 @@ +aclocal +automake -a +autoconf +./configure $* diff --git a/config.guess b/config.guess new file mode 120000 index 0000000..eb987ad --- /dev/null +++ b/config.guess @@ -0,0 +1 @@ +/usr/share/automake-1.9/config.guess \ No newline at end of file diff --git a/config.sub b/config.sub new file mode 120000 index 0000000..15d1b98 --- /dev/null +++ b/config.sub @@ -0,0 +1 @@ +/usr/share/automake-1.9/config.sub \ No newline at end of file diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..2b23687 --- /dev/null +++ b/configure.ac @@ -0,0 +1,54 @@ +dnl configure.ac for Mono.Upcoming library +AC_PREREQ(2.57) +AC_INIT(src/Mono.Upcoming/UpcomingConnection.cs) +AC_CANONICAL_SYSTEM +AM_INIT_AUTOMAKE(Mono.Upcoming, 0.1.0) +AM_MAINTAINER_MODE + +AC_PROG_INSTALL + +AC_PATH_PROG(CSC, csc, no) +AC_PATH_PROG(MCS, mcs, no) +AC_PATH_PROG(RUNTIME, mono, no) +CS="C#" +if test "x$CSC" = "xno" -a "x$MCS" = "xno" ; then + dnl AC_MSG_ERROR([You need to install a C# compiler]) + AC_MSG_ERROR([No $CS compiler found]) +fi + +if test "x$MCS" = "xno" ; then + MCS=$CSC +fi + + +AC_PATH_PROG(MDASSEMBLER, mdassembler, no) +AC_PATH_PROG(MONODOCER, monodocer, no) +if test "x$MONODOCER" = "xno" -o "x$MDASSEMBLER" = "xno"; then + enable_monodoc=no + doc_sources_dir= +else + enable_monodoc=yes + doc_sources_dir="`pkg-config --variable=sourcesdir monodoc`" +fi + +AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes") +AC_SUBST(MCS) +AC_SUBST(RUNTIME) +AC_SUBST(MDASSEMBLER) +AC_SUBST(MONODOCER) +AC_OUTPUT([ +Makefile +src/Makefile +src/mono-upcoming.pc +src/Mono.Upcoming/AssemblyInfo.cs +doc/Makefile +examples/Makefile +]) + +echo " * $CS compiler: $MCS" +echo " * Documentation build enabled: $enable_monodoc " +if test "x$enable_monodoc" = "xyes" -a "x$doc_sources_dir" != "x$prefix/lib/monodoc/sources"; then + echo " WARNING: The install prefix is different than the monodoc prefix." + echo " Monodoc will not be able to load the documentation." +fi + diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..62c602e --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,47 @@ +if ENABLE_MONODOC +SOURCESDIR=$(libdir)/monodoc/sources +TARGETS=Mono.Upcoming.tree Mono.Upcoming.zip Mono.Upcoming.source +UPDATER = $(MONODOCER) -path:Mono.Upcoming $(UPDATE_ASSEMBLIES) +else +SOURCESDIR=$(datadir) +TARGETS= +UPDATER = echo "Documentation build is disabled." +endif + +NAMESPACES=Mono.Upcoming +UPDATE_ASSEMBLIES = -assembly:$(top_builddir)/src/Mono.Upcoming.dll + +docsdir=$(SOURCESDIR) +docs_DATA=$(TARGETS) + +CLEANFILES=Mono.Upcoming.tree Mono.Upcoming.zip +EXTRA_DIST=Mono.Upcoming.source + +Mono.Upcoming: Mono.Upcoming.tree + +Mono.Upcoming.tree Mono.Upcoming.zip: $(srcdir)/Mono.Upcoming/*.xml $(srcdir)/Mono.Upcoming/*/*.xml + mdassembler --ecma $(srcdir)/Mono.Upcoming -o Mono.Upcoming + +install-hook: + cp Mono.Upcoming.* `pkg-config monodoc --variable=sourcesdir` + +uninstall-hook: + rm -f `pkg-config monodoc --variable=sourcesdir`/Mono.Upcoming.* + +update: + $(UPDATER) + +update-delete: + $(UPDATER) --delete + +merge: + monodoc --merge-changes ~/.config/monodoc/changeset.xml . + +dist-hook: + mkdir -p $(distdir)/Mono.Upcoming + cp $(srcdir)/Mono.Upcoming/*.xml $(distdir)/Mono.Upcoming/ + for i in $(NAMESPACES); do \ + mkdir -p $(distdir)/Mono.Upcoming/$$i; \ + cp $(srcdir)/Mono.Upcoming/$$i/*.xml $(distdir)/Mono.Upcoming/$$i; \ + done + diff --git a/doc/Mono.Upcoming.source b/doc/Mono.Upcoming.source new file mode 100644 index 0000000..24f7d73 --- /dev/null +++ b/doc/Mono.Upcoming.source @@ -0,0 +1,4 @@ + + + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming.xml b/doc/Mono.Upcoming/Mono.Upcoming.xml new file mode 100644 index 0000000..0272705 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming.xml @@ -0,0 +1,6 @@ + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/AttendStatus.xml b/doc/Mono.Upcoming/Mono.Upcoming/AttendStatus.xml new file mode 100644 index 0000000..2b2927c --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/AttendStatus.xml @@ -0,0 +1,46 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Enum + + + + + Field + + + System.Xml.Serialization.XmlEnum(Name="attend") + + + + Mono.Upcoming.AttendStatus + + + To be added. + + + + + Field + + + System.Xml.Serialization.XmlEnum(Name="watch") + + + + Mono.Upcoming.AttendStatus + + + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/AuthenticatedConnection.xml b/doc/Mono.Upcoming/Mono.Upcoming/AuthenticatedConnection.xml new file mode 100644 index 0000000..5b0e86e --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/AuthenticatedConnection.xml @@ -0,0 +1,320 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.UpcomingConnection + + + + + + Constructor + + + + + To be added. + To be added. + To be added. + + + + + Constructor + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.User + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Group[] + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Watch[] + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Event + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Event + + + + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Event + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Venue + + + + + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + Method + + System.Int32 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Int32 + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + Property + + Mono.Upcoming.Token + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Category.xml b/doc/Mono.Upcoming/Mono.Upcoming/Category.xml new file mode 100644 index 0000000..bf05fff --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Category.xml @@ -0,0 +1,74 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="description", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/ConnectionWrapper.xml b/doc/Mono.Upcoming/Mono.Upcoming/ConnectionWrapper.xml new file mode 100644 index 0000000..5a6fdd9 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/ConnectionWrapper.xml @@ -0,0 +1,69 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + Mono.Upcoming.UpcomingConnection + + + To be added. + To be added. + + + + + Method + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + Mono.Upcoming.UpcomingConnection + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Country.xml b/doc/Mono.Upcoming/Mono.Upcoming/Country.xml new file mode 100644 index 0000000..6c7817e --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Country.xml @@ -0,0 +1,87 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="code", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Method + + Mono.Upcoming.State[] + + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Event.xml b/doc/Mono.Upcoming/Mono.Upcoming/Event.xml new file mode 100644 index 0000000..6ef8552 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Event.xml @@ -0,0 +1,444 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="tags", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="description", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="start_date", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="end_date", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="personal", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="self_promotion", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="metro_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="venue_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="user_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="category_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="date_posted", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="latitude", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="longitude", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="geocoding_precision", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="geocoding_ambiguous", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Venue + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.User + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Group[] + + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.DateTime + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.DateTime + + + To be added. + To be added. + To be added. + + + + + Property + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + Property + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + Property + + System.Single + + + To be added. + To be added. + To be added. + + + + + Property + + System.Single + + + To be added. + To be added. + To be added. + + + + + Property + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Group.xml b/doc/Mono.Upcoming/Mono.Upcoming/Group.xml new file mode 100644 index 0000000..6271c2c --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Group.xml @@ -0,0 +1,243 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="description", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="moderation_level", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="is_private", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="timestamp", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="owner_user_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="commercial_account_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="num_members", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Method + + Mono.Upcoming.User + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.User[] + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Event[] + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Property + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + Property + + System.DateTime + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Metro.xml b/doc/Mono.Upcoming/Mono.Upcoming/Metro.xml new file mode 100644 index 0000000..7a2a48d --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Metro.xml @@ -0,0 +1,116 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="code", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="state_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Method + + Mono.Upcoming.State + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Venue[] + + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Response.xml b/doc/Mono.Upcoming/Mono.Upcoming/Response.xml new file mode 100644 index 0000000..bc84c02 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Response.xml @@ -0,0 +1,207 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + System.Xml.Serialization.XmlRoot(DataType="", ElementName="rsp", IsNullable=True, Namespace=null) + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="stat", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + Mono.Upcoming.Status + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="category", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Category[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="country", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Country[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="event", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Event[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="group", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Group[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="metro", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Metro[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="state", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.State[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="token", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Token + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="user", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.User[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="venue", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Venue[] + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlElement(DataType="", ElementName="watchlist", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, IsNullable=False, Type=null) + + + + Mono.Upcoming.Watch[] + + + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/State.xml b/doc/Mono.Upcoming/Mono.Upcoming/State.xml new file mode 100644 index 0000000..6db222f --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/State.xml @@ -0,0 +1,116 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="code", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="country_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Country + + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Status.xml b/doc/Mono.Upcoming/Mono.Upcoming/Status.xml new file mode 100644 index 0000000..48f57d2 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Status.xml @@ -0,0 +1,46 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Enum + + + + + Field + + + System.Xml.Serialization.XmlEnum(Name="failed") + + + + Mono.Upcoming.Status + + + To be added. + + + + + Field + + + System.Xml.Serialization.XmlEnum(Name="ok") + + + + Mono.Upcoming.Status + + + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Token.xml b/doc/Mono.Upcoming/Mono.Upcoming/Token.xml new file mode 100644 index 0000000..5c97081 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Token.xml @@ -0,0 +1,90 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="token", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="user_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="user_name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="user_username", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/UpcomingConnection.xml b/doc/Mono.Upcoming/Mono.Upcoming/UpcomingConnection.xml new file mode 100644 index 0000000..f8ebe6f --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/UpcomingConnection.xml @@ -0,0 +1,220 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + + Constructor + + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Category[] + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Event[] + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Country[] + + + + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.User + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.User + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Metro[] + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + Method + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + Property + + System.String + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/UpcomingException.xml b/doc/Mono.Upcoming/Mono.Upcoming/UpcomingException.xml new file mode 100644 index 0000000..27c4270 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/UpcomingException.xml @@ -0,0 +1,29 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Exception + + + + + + Constructor + + + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/UpcomingParam.xml b/doc/Mono.Upcoming/Mono.Upcoming/UpcomingParam.xml new file mode 100644 index 0000000..c064d78 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/UpcomingParam.xml @@ -0,0 +1,55 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + + Constructor + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + Property + + System.String + + + To be added. + To be added. + To be added. + + + + + Property + + System.Object + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/User.xml b/doc/Mono.Upcoming/Mono.Upcoming/User.xml new file mode 100644 index 0000000..21b0a66 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/User.xml @@ -0,0 +1,146 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + System.Object + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="username", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="zip", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="photourl", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="url", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Property + + System.Uri + + + To be added. + To be added. + To be added. + + + + + Property + + System.Uri + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Venue.xml b/doc/Mono.Upcoming/Mono.Upcoming/Venue.xml new file mode 100644 index 0000000..6242967 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Venue.xml @@ -0,0 +1,351 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="name", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="city", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="address", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="zip", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="description", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="phone", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="url", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="user_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="private", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="metro_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="latitude", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="longitude", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="geocoding_precision", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="geocoding_ambiguous", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.String + + + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.Uri + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.Single + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.Single + + + To be added. + To be added. + To be added. + + + + + Property + + + System.Xml.Serialization.XmlIgnore + + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/Mono.Upcoming/Watch.xml b/doc/Mono.Upcoming/Mono.Upcoming/Watch.xml new file mode 100644 index 0000000..93ce3a3 --- /dev/null +++ b/doc/Mono.Upcoming/Mono.Upcoming/Watch.xml @@ -0,0 +1,87 @@ + + + + Mono.Upcoming + 0.0.0.0 + + + Mono.Upcoming.ConnectionWrapper + + + + + + Constructor + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="event_id", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + System.Int32 + + + To be added. + To be added. + + + + + Field + + + System.Xml.Serialization.XmlAttribute(AttributeName="status", DataType="", Form=System.Xml.Schema.XmlSchemaForm.None, Namespace=null, Type=null) + + + + Mono.Upcoming.AttendStatus + + + To be added. + To be added. + + + + + Method + + Mono.Upcoming.Event + + + + To be added. + To be added. + To be added. + + + + + To be added. + To be added. + + diff --git a/doc/Mono.Upcoming/index.xml b/doc/Mono.Upcoming/index.xml new file mode 100644 index 0000000..2087905 --- /dev/null +++ b/doc/Mono.Upcoming/index.xml @@ -0,0 +1,30 @@ + + + + + To be added. + To be added. + + + + + + + + + + + + + + + + + + + + + + + Mono.Upcoming + diff --git a/examples/Authenticated.cs b/examples/Authenticated.cs new file mode 100644 index 0000000..cda641e --- /dev/null +++ b/examples/Authenticated.cs @@ -0,0 +1,32 @@ +using System; +using Mono.Upcoming; + +public class Authenticated +{ + static string API_KEY = "0a49a0f577"; + + public static void Main () + { + AuthenticatedConnection connection = new AuthenticatedConnection (API_KEY); + + Console.WriteLine ("Goto {0}", connection.FrobUrl); + Console.WriteLine ("Authenticate and paste the frob"); + Console.Write("Here: "); + string frob = Console.ReadLine (); + Console.WriteLine (); + + connection.CreateToken (frob); + + Watch[] watches = connection.GetWatchList (); + + foreach (Watch w in watches) { + Event e = w.GetEvent (); + Console.WriteLine ("Name: {0} - Id: {1}", e.Name, e.ID); + Console.WriteLine ("StartDate : {0}", e.StartDate); + + Venue v = e.GetVenue (); + Console.WriteLine ("Venue: {0} - City: {1}", v.Name, v.City); + Console.WriteLine (); + } + } +} diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..2b19979 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,14 @@ +SAMPLES=SearchEvents.cs Authenticated.cs +MCSFLAGS= -debug -nologo -r:Mono.Upcoming.dll + +EXTRA_DIST=$(SAMPLES) +CLEANFILES= *.exe *.mdb *.pdb *.dll + +noinst_SCRIPTS=$(SAMPLES:.cs=.exe) + +%.exe: %.cs Mono.Upcoming.dll + $(MCS) $(MCSFLAGS) -out:$@ $< + +Mono.Upcoming.dll: $(top_builddir)/src/Mono.Upcoming.dll + cp $(top_builddir)/src/Mono.Upcoming.dll* . + diff --git a/examples/SearchEvents.cs b/examples/SearchEvents.cs new file mode 100644 index 0000000..a7128cb --- /dev/null +++ b/examples/SearchEvents.cs @@ -0,0 +1,27 @@ +using System; +using System.Text; + +namespace Mono.Upcoming.Test +{ + class Program + { + static string API_KEY = "0a49a0f577"; + + static void Main (string[] args) + { + + UpcomingConnection connection = new UpcomingConnection (API_KEY); + + Event[] evts = connection.SearchEvents ("fosdem"); + + foreach (Event e in evts) { + Console.WriteLine ("Name: {0} - Id: {1}", e.Name, e.ID); + Console.WriteLine ("StartDate : {0}", e.StartDate); + + Venue v = e.GetVenue (); + Console.WriteLine ("Venue: {0} - City: {1}", v.Name, v.City); + Console.WriteLine (); + } + } + } +} diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..9bdfcb8 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,35 @@ +pkgconfigdir=$(libdir)/pkgconfig +MCSFLAGS= -debug -nologo -r:System.Web.dll + +monoupcomingdir = $(prefix)/lib/Mono.Upcoming +pkgconfig_DATA = mono-upcoming.pc +monoupcoming_SCRIPTS = Mono.Upcoming.dll + +CLEANFILES = Mono.Upcoming.dll* + +# +monoupcoming_references= + +monoupcoming_sources = \ + Mono.Upcoming/AuthenticatedConnection.cs \ + Mono.Upcoming/Category.cs \ + Mono.Upcoming/ConnectionWrapper.cs \ + Mono.Upcoming/Country.cs \ + Mono.Upcoming/Event.cs \ + Mono.Upcoming/Group.cs \ + Mono.Upcoming/Metro.cs \ + Mono.Upcoming/Response.cs \ + Mono.Upcoming/State.cs \ + Mono.Upcoming/Token.cs \ + Mono.Upcoming/UpcomingConnection.cs \ + Mono.Upcoming/UpcomingParam.cs \ + Mono.Upcoming/UpcomingUtil.cs \ + Mono.Upcoming/User.cs \ + Mono.Upcoming/Venue.cs \ + Mono.Upcoming/Watch.cs + +monoupcoming_build_sources = $(addprefix $(srcdir)/, $(monoupcoming_sources)) + +Mono.Upcoming.dll: $(monoupcoming_build_sources) + $(MCS) $(MCSFLAGS) $(monoupcoming_references) /target:library /out:$@ $(monoupcoming_build_sources) + diff --git a/src/Mono.Upcoming/AssemblyInfo.cs b/src/Mono.Upcoming/AssemblyInfo.cs new file mode 100644 index 0000000..1a50e92 --- /dev/null +++ b/src/Mono.Upcoming/AssemblyInfo.cs @@ -0,0 +1,36 @@ +// AssemblyInfo.cs for Mono.Upcoming.dll +// +// Authors: +// Thomas Van Machelen (thomas.vanmachelen@gmail.com) +// +// Copyright (c) 2007 Novell, Inc. (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyTitle ("Mono.Upcoming")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyCopyright ("(c) 2006 Novell, Inc.")] +[assembly: AssemblyCompany ("Novell, Inc.")] + diff --git a/src/Mono.Upcoming/AssemblyInfo.cs.in b/src/Mono.Upcoming/AssemblyInfo.cs.in new file mode 100644 index 0000000..e4422f2 --- /dev/null +++ b/src/Mono.Upcoming/AssemblyInfo.cs.in @@ -0,0 +1,36 @@ +// AssemblyInfo.cs for Mono.Upcoming.dll +// +// Authors: +// Thomas Van Machelen (thomas.vanmachelen@gmail.com) +// +// Copyright (c) 2007 Novell, Inc. (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("@VERSION@")] +[assembly: AssemblyTitle ("Mono.Upcoming")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyCopyright ("(c) 2006 Novell, Inc.")] +[assembly: AssemblyCompany ("Novell, Inc.")] + diff --git a/src/Mono.Upcoming/AuthenticatedConnection.cs b/src/Mono.Upcoming/AuthenticatedConnection.cs new file mode 100644 index 0000000..58ef9d7 --- /dev/null +++ b/src/Mono.Upcoming/AuthenticatedConnection.cs @@ -0,0 +1,271 @@ +using System; +using System.Text; +using System.Collections; + +namespace Mono.Upcoming +{ + public class AuthenticatedConnection : UpcomingConnection + { + private Token token; + + public Token Token { + get { return token; } + } + + public AuthenticatedConnection (string api_key) + : this (null, api_key) + { } + + public AuthenticatedConnection (string token, string api_key) + : base (api_key) + { + if (token == null) + return; + + CheckToken (token); + } + + public void CreateToken (string frob) + { + Response rsp = Util.Get ("auth.getToken", new UpcomingParam ("frob", frob)); + token = rsp.Token; + } + + private void CheckToken (string token) + { + Response rsp = Util.Get ("auth.checkToken", new UpcomingParam ("token", token)); + this.token = rsp.Token; + } + + public Metro[] GetMetroList () + { + Response rsp = Util.Get ("user.getMetroList", new UpcomingParam ("token", token.TokenString)); + + foreach (Metro m in rsp.Metros) + m.Connection = this; + + return rsp.Metros; + } + + public User GetUserInfo () + { + return base.GetUserInfo (token.UserId); + } + + public Group[] GetMyGroups () + { + Response rsp = Util.Get ("group.getMyGroups", new UpcomingParam ("token", Token.TokenString)); + SetConnection (rsp.Groups); + + return rsp.Groups; + } + + public Watch[] GetWatchList () + { + Response rsp = Util.Get ("watchlist.getList", new UpcomingParam ("token", token.TokenString)); + SetConnection (rsp.Watches); + + return rsp.Watches; + } + + public Event AddEvent (string name, Venue venue, Category category, DateTime start_date) + { + return AddEvent (name, venue, category, start_date, null, null, false, false); + } + + // Fixme: currently no end date support + public Event AddEvent (string name, Venue venue, Category category, DateTime start_date, + string description, Uri url, bool personal, bool selfpromotion) + { + System.Collections.ArrayList param_list = new System.Collections.ArrayList (); + param_list.Add (new UpcomingParam ("token", Token.TokenString)); + param_list.Add (new UpcomingParam ("name", name)); + param_list.Add (new UpcomingParam ("venue_id", venue.ID)); + param_list.Add (new UpcomingParam ("category_id", category.ID)); + param_list.Add (new UpcomingParam ("start_date", start_date.ToString ("YYYY-MM-DD"))); + param_list.Add (new UpcomingParam ("start_time", start_date.ToString ("HH:MM:SS"))); + + if (description != null && description != string.Empty) + param_list.Add (new UpcomingParam ("description", description)); + + if (url != null) + param_list.Add (new UpcomingParam ("url", url.ToString ())); + + if (personal) + param_list.Add (new UpcomingParam ("personal", 1)); + + if (selfpromotion) + param_list.Add (new UpcomingParam ("selfpromotion", 1)); + + UpcomingParam[] param_array = (UpcomingParam[]) param_list.ToArray (typeof (UpcomingParam)); + + Response rsp = Util.Post ("event.add", param_array); + + return rsp.Events[0]; + } + + public Event EditEvent (Event event_to_edit) + { + if (event_to_edit.UserID != Token.UserId) + throw new UpcomingException ("User Id must match Owner Id to be able to edit events"); + + System.Collections.ArrayList param_list = new System.Collections.ArrayList (); + param_list.Add (new UpcomingParam ("token", Token.TokenString)); + param_list.Add (new UpcomingParam ("name", event_to_edit.Name)); + param_list.Add (new UpcomingParam ("venue_id", event_to_edit.VenueID)); + param_list.Add (new UpcomingParam ("category_id", event_to_edit.CategoryID)); + param_list.Add (new UpcomingParam ("start_date", event_to_edit.StartDate.ToString ("YYYY-MM-DD"))); + param_list.Add (new UpcomingParam ("start_time", event_to_edit.StartDate.ToString ("HH:MM:SS"))); + + if (event_to_edit.Description != null && event_to_edit.Description != string.Empty) + param_list.Add (new UpcomingParam ("description", event_to_edit.Description)); + + if (event_to_edit.Personal) + param_list.Add (new UpcomingParam ("personal", 1)); + + if (event_to_edit.SelfPromotion) + param_list.Add (new UpcomingParam ("selfpromotion", 1)); + + UpcomingParam[] param_array = (UpcomingParam[])param_list.ToArray (typeof (UpcomingParam)); + + Response rsp = Util.Post ("event.edit", param_array); + + return rsp.Events[0]; + } + + public void AddTagsToEvent (Event event_to_edit, string tags) + { + Util.Post ("event.addTags", new UpcomingParam ("token", Token.TokenString), + new UpcomingParam ("event_id", event_to_edit.ID), + new UpcomingParam ("tags", tags)); + } + + public void RemoveTagFromEvent (Event event_to_edit, string tag) + { + Util.Post ("event.removeTag", new UpcomingParam ("token", Token.TokenString), + new UpcomingParam ("event_id", event_to_edit.ID), + new UpcomingParam ("tag", tag)); + } + + + public Venue AddVenue (string venuename, string venueaddress, string venuecity, Metro metro, string venuezip, string venuephone, + Uri venueurl, string venuedescription, bool is_private) + { + ArrayList param_list = CreateVenueParams (venuename, venueaddress, venuecity, metro.ID, venuezip, venuephone, venueurl.ToString (), venuedescription, is_private); + param_list.Add (new UpcomingParam ("token", Token.TokenString)); + + UpcomingParam[] param_array = (UpcomingParam[])param_list.ToArray (typeof (UpcomingParam)); + + Response rsp = Util.Post ("venue.add", param_array); + + return rsp.Venues[0]; + } + + public void EditVenue (Venue venue) + { + ArrayList param_list = CreateVenueParams (venue.Name, venue.Address, venue.City, venue.MetroId, venue.Zip, + venue.Phone, venue.url, venue.Description, venue.IsPrivate); + param_list.Add (new UpcomingParam ("venue_id", venue.ID)); + param_list.Add (new UpcomingParam ("token", Token.TokenString)); + + UpcomingParam[] param_array = (UpcomingParam[])param_list.ToArray (typeof (UpcomingParam)); + + Util.Post ("venue.edit", param_array); + } + + private static ArrayList CreateVenueParams (string venuename, string venueaddress, string venuecity, int metro_id, string venuezip, string venuephone, + string venueurl, string venuedescription, bool is_private) + { + System.Collections.ArrayList param_list = new System.Collections.ArrayList (); + param_list.Add (new UpcomingParam ("venuename", venuename)); + param_list.Add (new UpcomingParam ("venueaddress", venueaddress)); + param_list.Add (new UpcomingParam ("venuecity", venuecity)); + param_list.Add (new UpcomingParam ("metro_id", metro_id)); + + if (venuezip != null && venuezip != string.Empty) + param_list.Add (new UpcomingParam ("venuezip", venuename)); + + if (venuephone != null && venuephone != string.Empty) + param_list.Add (new UpcomingParam ("venuephone", venuephone)); + + if (venueurl != null) + param_list.Add (new UpcomingParam ("venueurl", venueurl)); + + if (venuedescription != null && venuedescription != string.Empty) + param_list.Add (new UpcomingParam ("venuedescription", venuedescription)); + + if (is_private) + param_list.Add (new UpcomingParam ("private", 1)); + + return param_list; + } + + public int AddEventToWatchList (Event event_to_add) + { + return this.AddEventToWatchList (event_to_add, AttendStatus.Watch); + } + + public int AddEventToWatchList (Event event_to_add, AttendStatus status) + { + Response rsp = Util.Post ("watchlist.add", new UpcomingParam ("token", Token.TokenString), + new UpcomingParam ("event_id", event_to_add.ID), + new UpcomingParam ("status", status.ToString ().ToLower ()) + ); + + return rsp.Watches[0].ID; + } + + public void RemoveWatch (Watch watch) + { + Util.Post ("watchlist.remove", new UpcomingParam ("token", Token.TokenString), + new UpcomingParam ("watchlist_id", watch.ID)); + } + + + internal override Group[] GetGroups (int event_id) + { + Response rsp = Util.Get ("event.getGroups", + new UpcomingParam ("event_id", event_id), + new UpcomingParam ("token", Token.TokenString)); + + foreach (Group group in rsp.Groups) + group.Connection = this; + + return rsp.Groups; + } + + internal override Venue[] GetVenues (int metro_id) + { + Response rsp = Util.Get ("venue.getList", new UpcomingParam ("metro_id", metro_id), + new UpcomingParam ("token", Token.TokenString)); + + foreach (Venue venue in rsp.Venues) + venue.Connection = this; + + return rsp.Venues; + } + + internal override User[] GetGroupMembers (int group_id, int page_nr, int members_per_page) + { + Response rsp = Util.Get ("group.getMembers", new UpcomingParam ("group_id", group_id), + new UpcomingParam ("page", page_nr), + new UpcomingParam ("membersPerPage", members_per_page), + new UpcomingParam ("token", Token.TokenString)); + + return rsp.Users; + } + + internal override Event[] GetGroupEvents (int group_id, int page_nr, int events_per_page) + { + Response rsp = Util.Get ("group.getEvents", new UpcomingParam ("group_id", group_id), + new UpcomingParam ("page", page_nr), + new UpcomingParam ("eventsPerPage", events_per_page), + new UpcomingParam ("token", Token.TokenString)); + + foreach (Event evt in rsp.Events) + evt.Connection = this; + + return rsp.Events; + } + } +} diff --git a/src/Mono.Upcoming/Category.cs b/src/Mono.Upcoming/Category.cs new file mode 100644 index 0000000..efccaf2 --- /dev/null +++ b/src/Mono.Upcoming/Category.cs @@ -0,0 +1,16 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class Category + { + [XmlAttribute ("id")] + public string ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("description")] + public string Description; + } +} diff --git a/src/Mono.Upcoming/ConnectionWrapper.cs b/src/Mono.Upcoming/ConnectionWrapper.cs new file mode 100644 index 0000000..c643d80 --- /dev/null +++ b/src/Mono.Upcoming/ConnectionWrapper.cs @@ -0,0 +1,21 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public abstract class ConnectionWrapper + { + protected UpcomingConnection connection; + + [XmlIgnore ()] + public UpcomingConnection Connection { + get { return connection; } + set { connection = value; } + } + + public void ApplyConnection (ConnectionWrapper[] wrappers) + { + foreach (ConnectionWrapper w in wrappers) + w.Connection = this.connection; + } + } +} diff --git a/src/Mono.Upcoming/Country.cs b/src/Mono.Upcoming/Country.cs new file mode 100644 index 0000000..9fd569a --- /dev/null +++ b/src/Mono.Upcoming/Country.cs @@ -0,0 +1,25 @@ +using System.Xml.Serialization; +using System.Xml.Schema; + +namespace Mono.Upcoming +{ + public class Country : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("code")] + public string Code; + + public State[] GetStateList () + { + Response rsp = connection.Util.Get ("metro.getStateList", new UpcomingParam ("country_id", ID)); + ApplyConnection (rsp.States); + + return rsp.States; + } + } +} diff --git a/src/Mono.Upcoming/Event.cs b/src/Mono.Upcoming/Event.cs new file mode 100644 index 0000000..d4c444d --- /dev/null +++ b/src/Mono.Upcoming/Event.cs @@ -0,0 +1,148 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class Event : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("tags")] + public string Tags; + + [XmlAttribute ("description")] + public string Description; + + [XmlAttribute ("start_date")] + public string start_date; + + [XmlIgnore ()] + public System.DateTime StartDate + { + get { + try + { + return System.DateTime.Parse (start_date); + } + catch + { + return new System.DateTime (0); + } + } + } + + [XmlAttribute ("end_date")] + public string end_date; + + [XmlIgnore ()] + public System.DateTime EndDate + { + get + { + try + { + return System.DateTime.Parse (end_date); + } + catch + { + return new System.DateTime (0); + } + } + } + + [XmlAttribute ("personal")] + public int personal; + + public bool Personal { + get { return personal == 1 ? true : false; } + } + + [XmlAttribute ("self_promotion")] + public int self_promotion; + + public bool SelfPromotion { + get { return self_promotion == 1 ? true : false; } + } + + [XmlAttribute ("metro_id")] + public int MetroID; + + [XmlAttribute ("venue_id")] + public int VenueID; + + [XmlAttribute ("user_id")] + public int UserID; + + [XmlAttribute ("category_id")] + public int CategoryID; + + [XmlAttribute ("date_posted")] + public string date_posted; + + [XmlAttribute ("latitude")] + public string latitude; + + public float Latitude { + get { + try { + return float.Parse (latitude); + } + catch { + return 0.0F; + } + } + } + + [XmlAttribute ("longitude")] + public string longitude; + + public float Longitude { + get { + try { + return float.Parse (longitude); + } + catch { + return 0.0F; + } + } + } + + [XmlAttribute ("geocoding_precision")] + public string GeocodingPrecision; + + [XmlAttribute ("geocoding_ambiguous")] + public string geocoding_ambiguous; + + public bool GeocodingAmbiguous { + get { + if (geocoding_ambiguous == "1") + return true; + else + return false; + } + } + + public Metro GetMetro () + { + return connection.GetMetro (MetroID); + } + + public Venue GetVenue () + { + return connection.GetVenue (VenueID); + } + + public User GetUser () + { + return connection.GetUserInfo (UserID); + } + + public Group[] GetGroups () + { + return connection.GetGroups (ID); + } + } +} diff --git a/src/Mono.Upcoming/Group.cs b/src/Mono.Upcoming/Group.cs new file mode 100644 index 0000000..ba394a3 --- /dev/null +++ b/src/Mono.Upcoming/Group.cs @@ -0,0 +1,58 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class Group : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("description")] + public string Description; + + [XmlAttribute ("moderation_level")] + public string ModerationLevel; + + [XmlAttribute ("is_private")] + public int is_private; + + public bool IsPrivate { + get { return is_private == 1 ? true : false; } + } + + [XmlAttribute ("timestamp")] + public string timestamp; + + public System.DateTime Timestamp { + get { return System.DateTime.Parse (timestamp); } + } + + [XmlAttribute ("owner_user_id")] + public int OwnerUserId; + + [XmlAttribute ("commercial_account_id")] + public int CommercialAccountId; + + [XmlAttribute ("num_members")] + public int NumberOfMembers; + + + public User GetOwner () + { + return connection.GetUserInfo (OwnerUserId); + } + + public User[] GetMembers (int page_nr, int members_per_page) + { + return connection.GetGroupMembers (ID, page_nr, members_per_page); + } + + public Event[] GetEvents (int page_nr, int events_per_page) + { + return connection.GetGroupEvents (ID, page_nr, events_per_page); + } + } +} diff --git a/src/Mono.Upcoming/Metro.cs b/src/Mono.Upcoming/Metro.cs new file mode 100644 index 0000000..9b58888 --- /dev/null +++ b/src/Mono.Upcoming/Metro.cs @@ -0,0 +1,29 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class Metro : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("code")] + public string Code; + + [XmlAttribute ("state_id")] + public int StateId; + + public State GetState () + { + return connection.GetState (StateId); + } + + public Venue[] GetVenues () + { + return connection.GetVenues (ID); + } + } +} diff --git a/src/Mono.Upcoming/Response.cs b/src/Mono.Upcoming/Response.cs new file mode 100644 index 0000000..d77afb9 --- /dev/null +++ b/src/Mono.Upcoming/Response.cs @@ -0,0 +1,49 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + [XmlRoot ("rsp")] + public class Response + { + [XmlAttribute ("stat")] + public Status Status; + + [XmlElement ("category")] + public Category[] Categories; + + [XmlElement ("country")] + public Country[] Countries; + + [XmlElement ("event")] + public Event[] Events; + + [XmlElement ("group")] + public Group[] Groups; + + [XmlElement ("metro")] + public Metro[] Metros; + + [XmlElement ("state")] + public State[] States; + + [XmlElement ("token")] + public Token Token; + + [XmlElement ("user")] + public User[] Users; + + [XmlElement ("venue")] + public Venue[] Venues; + + [XmlElement ("watchlist")] + public Watch[] Watches; + } + + public enum Status + { + [XmlEnum ("ok")] + OK, + [XmlEnum ("failed")] + Failed + } +} diff --git a/src/Mono.Upcoming/State.cs b/src/Mono.Upcoming/State.cs new file mode 100644 index 0000000..0c91be7 --- /dev/null +++ b/src/Mono.Upcoming/State.cs @@ -0,0 +1,35 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class State : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("code")] + public string Code; + + [XmlAttribute ("country_id")] + public int CountryID; + + public Metro[] GetMetroList () + { + Response rsp = connection.Util.Get ("metro.getList", new UpcomingParam ("state_id", ID)); + ApplyConnection (rsp.Metros); + + return rsp.Metros; + } + + public Country GetCountry () + { + Response rsp = connection.Util.Get ("country.getInfo", new UpcomingParam ("country_id", CountryID)); + ApplyConnection (rsp.Countries); + + return rsp.Countries[0]; + } + } +} diff --git a/src/Mono.Upcoming/Token.cs b/src/Mono.Upcoming/Token.cs new file mode 100644 index 0000000..843eede --- /dev/null +++ b/src/Mono.Upcoming/Token.cs @@ -0,0 +1,19 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class Token + { + [XmlAttribute ("token")] + public string TokenString; + + [XmlAttribute ("user_id")] + public int UserId; + + [XmlAttribute ("user_name")] + public string UserFullName; + + [XmlAttribute ("user_username")] + public string UserName; + } +} diff --git a/src/Mono.Upcoming/UpcomingConnection.cs b/src/Mono.Upcoming/UpcomingConnection.cs new file mode 100644 index 0000000..138b604 --- /dev/null +++ b/src/Mono.Upcoming/UpcomingConnection.cs @@ -0,0 +1,192 @@ +using System; +using System.Text; + +namespace Mono.Upcoming +{ + public class UpcomingConnection + { + private UpcomingUtil util; + + internal UpcomingUtil Util { + get { return util; } + } + + public string FrobUrl { + get { + return string.Format ("http://upcoming.org/services/auth/?api_key={0}", Util.APIKey); + } + } + + public UpcomingConnection (string api_key) + { + this.util = new UpcomingUtil (api_key); + } + + public Category[] GetCategoryList () + { + Response rsp = Util.Get ("category.getList"); + + return rsp.Categories; + } + + public Event[] SearchEvents (string search_text) + { + Response rsp = Util.Get ("event.search", new UpcomingParam ("search_text", search_text)); + SetConnection (rsp.Events); + + return rsp.Events; + } + + public Country[] GetCountryList () + { + Response rsp = Util.Get ("metro.getCountryList"); + SetConnection (rsp.Countries); + + return rsp.Countries; + } + + public Metro[] GetByLatLon (float latitude, float longitude) + { + Response rsp = Util.Get ("metro.getForLatLon", new UpcomingParam ("latitude", latitude), + new UpcomingParam ("longitude", longitude)); + SetConnection (rsp.Metros); + + return rsp.Metros; + } + + public User GetUserInfo (int user_id) + { + Response rsp = Util.Get ("user.getInfo", new UpcomingParam ("user_id", user_id)); + + return rsp.Users[0]; + } + + public User GetUserInfoByUsername (string username) + { + Response rsp = Util.Get ("user.getInfoByUsername", new UpcomingParam ("username", username)); + + return rsp.Users[0]; + } + + public Metro[] SearchMetro (string search_text) + { + return SearchMetro (search_text, null, null); + } + + public Metro[] SearchMetro (string search_text, Country country) + { + return SearchMetro (search_text, country, null); + } + + public Metro[] SearchMetro (string search_text, State state) + { + return SearchMetro (search_text, null, state); + } + + public Metro[] SearchMetro (string search_text, Country country, State state) + { + System.Collections.ArrayList list = new System.Collections.ArrayList (); + list.Add (new UpcomingParam ("search_text", search_text)); + + if (country != null) + list.Add (new UpcomingParam ("country_id", country.ID)); + + if (state != null) + list.Add (new UpcomingParam ("state_id", state.ID)); + + Response rsp = Util.Get ("metro.search", (UpcomingParam[])list.ToArray (typeof (UpcomingParam))); + + SetConnection (rsp.Metros); + + return rsp.Metros; + } + + + internal Country GetCountry (int country_id) + { + Response rsp = Util.Get ("country.getInfo", new UpcomingParam ("country_id", country_id)); + SetConnection (rsp.Countries); + + return rsp.Countries[0]; + } + + internal State GetState (int state_id) + { + Response rsp = Util.Get ("state.getInfo", new UpcomingParam ("state_id", state_id)); + SetConnection (rsp.States); + + return rsp.States[0]; + } + + internal Metro GetMetro (int metro_id) + { + Response rsp = Util.Get ("metro.getInfo", new UpcomingParam ("metro_id", metro_id)); + SetConnection (rsp.Metros); + + return rsp.Metros[0]; + } + + internal Venue GetVenue (int venue_id) + { + Response rsp = Util.Get ("venue.getInfo", new UpcomingParam ("venue_id", venue_id)); + SetConnection (rsp.Venues); + + return rsp.Venues[0]; + } + + internal Event GetEvent (int event_id) + { + Response rsp = Util.Get ("event.getInfo", new UpcomingParam ("event_id", event_id)); + SetConnection (rsp.Events); + + return rsp.Events[0]; + } + + internal virtual Group[] GetGroups (int event_id) + { + Response rsp = Util.Get ("event.getGroups", new UpcomingParam ("event_id", event_id)); + SetConnection (rsp.Groups); + + return rsp.Groups; + } + + internal virtual Venue[] GetVenues (int metro_id) + { + Response rsp = Util.Get ("venue.getList", new UpcomingParam ("metro_id", metro_id)); + SetConnection (rsp.Venues); + + return rsp.Venues; + } + + //FIXME: we shouldn't need to pass the page_nr and members_per_page parameters, but otherwise the call fails + internal virtual User[] GetGroupMembers (int group_id, int page_nr, int members_per_page) + { + Response rsp = Util.Get ("group.getMembers", new UpcomingParam ("group_id", group_id), + new UpcomingParam ("page", page_nr), + new UpcomingParam ("membersPerPage", members_per_page)); + + return rsp.Users; + } + + //FIXME: we shouldn't need to pass the page_nr and events_per_page parameters, but otherwise the call fails + internal virtual Event[] GetGroupEvents (int group_id, int page_nr, int events_per_page) + { + Response rsp = Util.Get ("group.getEvents", new UpcomingParam ("group_id", group_id), + new UpcomingParam ("page", page_nr), + new UpcomingParam ("eventsPerPage", events_per_page)); + SetConnection (rsp.Events); + + return rsp.Events; + } + + + protected void SetConnection (ConnectionWrapper[] wrappers) + { + if (wrappers == null) + return; + + foreach (ConnectionWrapper w in wrappers) + w.Connection = this; + } + } +} diff --git a/src/Mono.Upcoming/UpcomingParam.cs b/src/Mono.Upcoming/UpcomingParam.cs new file mode 100644 index 0000000..18304e9 --- /dev/null +++ b/src/Mono.Upcoming/UpcomingParam.cs @@ -0,0 +1,27 @@ +namespace Mono.Upcoming +{ + public class UpcomingParam + { + private string name; + private object value; + + public string Name { + get { return name; } + } + + public object Value { + get { return value; } + } + + public override string ToString () + { + return string.Format ("&{0}={1}", System.Web.HttpUtility.UrlEncode (Name), System.Web.HttpUtility.UrlEncode (Value.ToString ())); + } + + public UpcomingParam (string name, object value) + { + this.name = name; + this.value = value; + } + } +} diff --git a/src/Mono.Upcoming/UpcomingUtil.cs b/src/Mono.Upcoming/UpcomingUtil.cs new file mode 100644 index 0000000..aec28c8 --- /dev/null +++ b/src/Mono.Upcoming/UpcomingUtil.cs @@ -0,0 +1,138 @@ +using System; +using System.Text; +using System.Xml; +using System.Net; +using System.IO; +using System.Xml.Serialization; +using System.Security; + +namespace Mono.Upcoming +{ + internal class UpcomingUtil + { + private static readonly string URL = "http://upcoming.org/services/rest/?"; + private static XmlSerializer response_serializer; + private string api_key; + + public string APIKey { + get { return api_key; } + } + + static UpcomingUtil () { + response_serializer = new XmlSerializer (typeof (Response)); + } + + public UpcomingUtil (string api_key) + { + this.api_key = api_key; + } + + public Response Get (string method_name, params UpcomingParam[] parameters) + { + string parameter_string = FormatParameters (method_name, parameters); + return GetParameters (parameter_string); + } + + public Response Post (string method_name, params UpcomingParam[] parameters) + { + string parameter_string = FormatParameters (method_name, parameters); + return PostParameters (parameter_string); + } + + private string FormatParameters (string method_name, params UpcomingParam[] parameters) + { + StringBuilder builder = new StringBuilder (string.Format ("api_key={0}&method={1}", api_key, method_name)); + + foreach (UpcomingParam param in parameters) + builder.Append (param.ToString ()); + + return builder.ToString (); + } + + private static string GetString (string url) + { + HttpWebRequest request = HttpWebRequest.Create (url) as HttpWebRequest; + request.Credentials = CredentialCache.DefaultCredentials; + WebResponse response = request.GetResponse (); + string result = new StreamReader (response.GetResponseStream ()).ReadToEnd (); + response.Close (); + return result; + } + + private static Response GetParameters (string parameters) + { + string url = string.Format ("{0}{1}", URL, parameters); + HttpWebRequest request = HttpWebRequest.Create (url) as HttpWebRequest; + request.Credentials = CredentialCache.DefaultCredentials; + + WebResponse response = null; + + try { + response = request.GetResponse (); + // Console.WriteLine (GetString (url)); + return (Response)response_serializer.Deserialize (response.GetResponseStream ()); + } + catch (WebException ex) { + throw new UpcomingException (ex.Message); + } + finally { + if (response != null) + response.Close (); + } + } + + private static Response PostParameters (string parameter_string) + { + WebRequest conn; + + try { + conn = WebRequest.Create (URL); + } + catch (SecurityException) { + throw; + } + + conn.Method = "POST"; + conn.ContentType = "application/x-www-form-urlencoded"; + + byte[] buf = Encoding.UTF8.GetBytes (parameter_string); + conn.ContentLength = buf.Length; + + Stream stream = conn.GetRequestStream (); + try { + stream.Write (buf, 0, buf.Length); + } + catch (IOException) { + throw; + } + finally { + stream.Close (); + } + + WebResponse response = null; + + // FIXME ugh... we shouldn't need to trap any exceptions + // but apparently upcoming.org returns 404 Not found exception + // on e.g. "watchlist.remove", so we don't want to die on the response giving errors. + // There ain't much we can do about it for now though. + try { + response = conn.GetResponse (); + return (Response)response_serializer.Deserialize (response.GetResponseStream ()); + } + catch { + return null; + } + finally { + if (response != null) + response.Close (); + } + } + } + + public class UpcomingException : Exception + { + public UpcomingException (string msg) + : base (msg) + { } + } +} diff --git a/src/Mono.Upcoming/User.cs b/src/Mono.Upcoming/User.cs new file mode 100644 index 0000000..340b5c4 --- /dev/null +++ b/src/Mono.Upcoming/User.cs @@ -0,0 +1,47 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class User + { + [XmlAttribute ("id")] + public string UserId; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("username")] + public string Username; + + [XmlAttribute ("zip")] + public string Zip; + + [XmlAttribute ("photourl")] + public string photourl; + + public System.Uri PhotoUrl { + get { + try { + return new System.Uri (photourl); + } + catch { + return null; + } + } + } + + [XmlAttribute ("url")] + public string url; + + public System.Uri Url { + get { + try { + return new System.Uri (url); + } + catch { + return null; + } + } + } + } +} diff --git a/src/Mono.Upcoming/Venue.cs b/src/Mono.Upcoming/Venue.cs new file mode 100644 index 0000000..a1074fb --- /dev/null +++ b/src/Mono.Upcoming/Venue.cs @@ -0,0 +1,99 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public class Venue : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("name")] + public string Name; + + [XmlAttribute ("city")] + public string City; + + [XmlAttribute ("address")] + public string Address; + + [XmlAttribute ("zip")] + public string Zip; + + [XmlAttribute ("description")] + public string Description; + + [XmlAttribute ("phone")] + public string Phone; + + [XmlAttribute ("url")] + public string url; + + [XmlIgnore ()] + public System.Uri Url { + get { + try { + return new System.Uri (url); + } + catch { + return null; + } + } + } + + [XmlAttribute ("user_id")] + public int UserID; + + [XmlAttribute ("private")] + public int is_private; + + [XmlIgnore ()] + public bool IsPrivate { + get { return is_private == 1 ? true : false; } + } + + [XmlAttribute ("metro_id")] + public int MetroId; + + [XmlAttribute ("latitude")] + public string latitude; + + [XmlIgnore ()] + public float Latitude { + get { + try { + return float.Parse (latitude); + } + catch { + return 0.0F; + } + } + } + + [XmlAttribute ("longitude")] + public string longitude; + + [XmlIgnore ()] + public float Longitude { + get { + try { + return float.Parse (longitude); + } + catch { + return 0.0F; + } + } + } + + [XmlAttribute ("geocoding_precision")] + public string GeocodingPrecision; + + [XmlAttribute ("geocoding_ambiguous")] + public string is_geocoding_ambiguous; + + [XmlIgnore ()] + public bool IsGeocodingAmbiguous { + get { return is_geocoding_ambiguous == "1" ? true : false; } + } + + } +} diff --git a/src/Mono.Upcoming/Watch.cs b/src/Mono.Upcoming/Watch.cs new file mode 100644 index 0000000..5513436 --- /dev/null +++ b/src/Mono.Upcoming/Watch.cs @@ -0,0 +1,29 @@ +using System.Xml.Serialization; + +namespace Mono.Upcoming +{ + public enum AttendStatus + { + [XmlEnum ("attend")] + Attend, + [XmlEnum ("watch")] + Watch + } + + public class Watch : ConnectionWrapper + { + [XmlAttribute ("id")] + public int ID; + + [XmlAttribute ("event_id")] + public int EventID; + + [XmlAttribute ("status")] + public AttendStatus Status; + + public Event GetEvent () + { + return connection.GetEvent (EventID); + } + } +} diff --git a/src/mono-upcoming.pc.in b/src/mono-upcoming.pc.in new file mode 100644 index 0000000..74a10de --- /dev/null +++ b/src/mono-upcoming.pc.in @@ -0,0 +1,8 @@ +prefix=@prefix@ +assemblies_dir=${prefix}/lib/Mono.Upcoming +Libraries=${assemblies_dir}/Mono.Upcoming.dll + +Name: Mono.Upcoming +Description: Mono.Upcoming.dll - +Version: 0.1 +Libs: -r:${assemblies_dir}/Mono.Upcoming.dll