Permalink
Browse files

No commit message

  • Loading branch information...
digitallyborn
digitallyborn committed Mar 12, 2010
1 parent c118c16 commit da5417bcef2ce910adda89c676cc673bcddae1b4
Showing with 636 additions and 53 deletions.
  1. +19 −0 Twitterizer2.license.txt
  2. +5 −0 Twitterizer2.sln
  3. 0 Twitterizer2/Commands/{ → Account}/RateLimitStatusCommand.cs
  4. 0 Twitterizer2/Commands/{ → Direct Messages}/DeleteDirectMessageCommand.cs
  5. 0 Twitterizer2/Commands/{ → Direct Messages}/DirectMessagesCommand.cs
  6. 0 Twitterizer2/Commands/{ → Direct Messages}/DirectMessagesSentCommand.cs
  7. 0 Twitterizer2/Commands/{ → Direct Messages}/SendDirectMessageCommand.cs
  8. 0 Twitterizer2/Commands/{ → Friendship}/CreateFriendshipCommand.cs
  9. 0 Twitterizer2/Commands/{ → Friendship}/DeleteFriendshipCommand.cs
  10. 0 Twitterizer2/Commands/{ → Friendship}/ShowFriendshipCommand.cs
  11. 0 Twitterizer2/Commands/{ → Lists}/CreateListCommand.cs
  12. +96 −0 Twitterizer2/Commands/Lists/DeleteListCommand.cs
  13. +126 −0 Twitterizer2/Commands/Lists/GetListCommand.cs
  14. 0 Twitterizer2/Commands/{ → Lists}/GetListsCommand.cs
  15. +81 −0 Twitterizer2/Commands/Lists/ListMembershipsCommand.cs
  16. +161 −0 Twitterizer2/Commands/Lists/ListStatusesCommand.cs
  17. 0 Twitterizer2/Commands/{ → Lists}/UpdateListCommand.cs
  18. 0 Twitterizer2/Commands/{ → Status}/DeleteStatusCommand.cs
  19. 0 Twitterizer2/Commands/{ → Status}/RetweetCommand.cs
  20. 0 Twitterizer2/Commands/{ → Status}/RetweetsCommand.cs
  21. 0 Twitterizer2/Commands/{ → Status}/ShowStatusCommand.cs
  22. 0 Twitterizer2/Commands/{ → Status}/UpdateStatusCommand.cs
  23. 0 Twitterizer2/Commands/{ → Timelines}/FriendsTimelineCommand.cs
  24. 0 Twitterizer2/Commands/{ → Timelines}/HomeTimelineCommand.cs
  25. 0 Twitterizer2/Commands/{ → Timelines}/MentionsCommand.cs
  26. 0 Twitterizer2/Commands/{ → Timelines}/PublicTimelineCommand.cs
  27. 0 Twitterizer2/Commands/{ → Timelines}/RetweetedByMeCommand.cs
  28. 0 Twitterizer2/Commands/{ → Timelines}/RetweetedToMeCommand.cs
  29. 0 Twitterizer2/Commands/{ → Timelines}/RetweetsOfMeCommand.cs
  30. 0 Twitterizer2/Commands/{ → Timelines}/UserTimelineCommand.cs
  31. 0 Twitterizer2/Commands/{ → User}/FollowersCommand.cs
  32. 0 Twitterizer2/Commands/{ → User}/FriendsCommand.cs
  33. +1 −6 Twitterizer2/Commands/{ → User}/ShowUserCommand.cs
  34. 0 Twitterizer2/Commands/{ → User}/UserSearchCommand.cs
  35. +1 −0 Twitterizer2/Core/BaseCollection.cs
  36. +4 −3 Twitterizer2/Core/BaseCommand.cs
  37. +13 −1 Twitterizer2/OAuth/OAuthUtility.cs
  38. +69 −11 Twitterizer2/TwitterEntities/TwitterList.cs
  39. +15 −0 Twitterizer2/TwitterEntities/TwitterStatusCollection.cs
  40. +36 −32 Twitterizer2/Twitterizer2.csproj
  41. +9 −0 Twitterizer2/_revision.xml
  42. BIN lib/Twitterizer2 Command Class.zip
@@ -0,0 +1,19 @@
Copyright (c) 2010, Patrick "Ricky" Smith
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.

- Neither the name Twitterizer nor the names of its contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -36,19 +36,24 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Framework-Only-Debug|Any CPU = Framework-Only-Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2FDC3492-6B9E-4771-9755-7892C9CB1E96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FDC3492-6B9E-4771-9755-7892C9CB1E96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FDC3492-6B9E-4771-9755-7892C9CB1E96}.Framework-Only-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FDC3492-6B9E-4771-9755-7892C9CB1E96}.Framework-Only-Debug|Any CPU.Build.0 = Debug|Any CPU
{2FDC3492-6B9E-4771-9755-7892C9CB1E96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FDC3492-6B9E-4771-9755-7892C9CB1E96}.Release|Any CPU.Build.0 = Release|Any CPU
{83EB84AC-89B8-449F-9060-C197A60DB764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83EB84AC-89B8-449F-9060-C197A60DB764}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83EB84AC-89B8-449F-9060-C197A60DB764}.Framework-Only-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83EB84AC-89B8-449F-9060-C197A60DB764}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83EB84AC-89B8-449F-9060-C197A60DB764}.Release|Any CPU.Build.0 = Release|Any CPU
{A202C98F-EFD6-422A-8C03-BCD069377FA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A202C98F-EFD6-422A-8C03-BCD069377FA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A202C98F-EFD6-422A-8C03-BCD069377FA9}.Framework-Only-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A202C98F-EFD6-422A-8C03-BCD069377FA9}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{A202C98F-EFD6-422A-8C03-BCD069377FA9}.Release|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
@@ -0,0 +1,96 @@
//-----------------------------------------------------------------------
// <copyright file="DeleteListCommand.cs" company="Patrick 'Ricky' Smith">
// This file is part of the Twitterizer library (http://code.google.com/p/twitterizer/)
//
// Copyright (c) 2010, Patrick "Ricky" Smith (ricky@digitally-born.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this list
// of conditions and the following disclaimer.
// - Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
// - Neither the name of the Twitterizer nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// </copyright>
// <author>Ricky Smith</author>
// <summary>The delete list command class</summary>
//-----------------------------------------------------------------------

namespace Twitterizer.Commands
{
using System;
using System.Globalization;
using Twitterizer;
using Twitterizer.Core;

/// <summary>
/// The create list command class
/// </summary>
internal sealed class DeleteListCommand : BaseCommand<TwitterList>
{
/// <summary>
/// The base address to the API method.
/// </summary>
private const string Path = "http://api.twitter.com/1/{0}/lists/{1}.json";

#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="DeleteListCommand"/> class.
/// </summary>
/// <param name="requestTokens">The request tokens.</param>
/// <param name="username">The username.</param>
/// <param name="listIdOrSlug">The list id or slug.</param>
public DeleteListCommand(OAuthTokens requestTokens, string username, string listIdOrSlug)
: base("DELETE", requestTokens)
{
if (Tokens == null)
{
throw new ArgumentNullException("requestTokens");
}

if (string.IsNullOrEmpty(username))
{
throw new ArgumentNullException("username");
}

if (string.IsNullOrEmpty(listIdOrSlug))
{
throw new ArgumentNullException("listIdOrSlug");
}

this.Uri = new Uri(string.Format(CultureInfo.CurrentCulture, Path, username, listIdOrSlug));
}
#endregion

/// <summary>
/// Initializes the command.
/// </summary>
public override void Init()
{
}

/// <summary>
/// Validates this instance.
/// </summary>
public override void Validate()
{
this.IsValid = true;
}
}
}
@@ -0,0 +1,126 @@
//-----------------------------------------------------------------------
// <copyright file="GetListCommand.cs" company="Patrick 'Ricky' Smith">
// This file is part of the Twitterizer library (http://code.google.com/p/twitterizer/)
//
// Copyright (c) 2010, Patrick "Ricky" Smith (ricky@digitally-born.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this list
// of conditions and the following disclaimer.
// - Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
// - Neither the name of the Twitterizer nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// </copyright>
// <author>Ricky Smith</author>
// <summary>The get list command class</summary>
//-----------------------------------------------------------------------

namespace Twitterizer.Commands
{
using System;
using System.Globalization;
using Twitterizer;
using Twitterizer.Core;

/// <summary>
/// The create list command class
/// </summary>
internal sealed class GetListCommand : BaseCommand<TwitterListCollection>
{
/// <summary>
/// The base address to the API method.
/// </summary>
private const string Path = "http://api.twitter.com/1/{0}/lists/{1}.json";

#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="GetListCommand"/> class.
/// </summary>
/// <param name="requestTokens">The request tokens.</param>
/// <param name="username">The username.</param>
public GetListCommand(OAuthTokens requestTokens, string username)
: base("GET", requestTokens)
{
if (Tokens == null)
{
throw new ArgumentNullException("requestTokens");
}

if (string.IsNullOrEmpty(username))
{
throw new ArgumentNullException("username");
}

this.Username = username;
}
#endregion

#region API Properties
/// <summary>
/// Gets or sets the list id.
/// </summary>
/// <value>The list id.</value>
public long ListId { get; set; }

/// <summary>
/// Gets or sets the slug.
/// </summary>
/// <value>The list slug.</value>
public string Slug { get; set; }

/// <summary>
/// Gets or sets the username.
/// </summary>
/// <value>The username.</value>
public string Username { get; set; }
#endregion

/// <summary>
/// Initializes the command.
/// </summary>
public override void Init()
{
if (this.ListId > 0)
{
this.Uri = new Uri(string.Format(
CultureInfo.CurrentCulture,
Path,
this.Username,
this.ListId.ToString(CultureInfo.InvariantCulture)));
}
else if (!string.IsNullOrEmpty(this.Slug))
{
this.Uri = new Uri(string.Format(
CultureInfo.CurrentCulture,
Path,
this.Username,
this.Slug));
}
}

/// <summary>
/// Validates this instance.
/// </summary>
public override void Validate()
{
this.IsValid = this.ListId > 0 || !string.IsNullOrEmpty(this.Slug);
}
}
}
@@ -0,0 +1,81 @@
//-----------------------------------------------------------------------
// <copyright file="ListMembershipsCommand.cs" company="Patrick 'Ricky' Smith">
// This file is part of the Twitterizer library (http://code.google.com/p/twitterizer/)
//
// Copyright (c) 2010, Patrick "Ricky" Smith (ricky@digitally-born.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this list
// of conditions and the following disclaimer.
// - Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
// - Neither the name of the Twitterizer nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// </copyright>
// <author>Ricky Smith</author>
// <summary>The list membership command class</summary>
//-----------------------------------------------------------------------

namespace Twitterizer.Commands
{
using System;
using Twitterizer;
using Twitterizer.Core;
using System.Globalization;

/// <summary>
/// The list membership command class
/// </summary>
internal sealed class ListMembershipsCommand : BaseCommand<TwitterListWrapper>
{
/// <summary>
/// The base address to the API method.
/// </summary>
private const string Path = "http://api.twitter.com/1/{0}/lists/memberships.json";

#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="ListMembershipsCommand"/> class.
/// </summary>
/// <param name="requestTokens">The request tokens.</param>
public ListMembershipsCommand(OAuthTokens requestTokens)
: base("GET", new Uri(Path), requestTokens)
{
if (Tokens == null)
{
throw new ArgumentNullException("requestTokens");
}
}
#endregion

#region API Properties

#endregion

public override void Init()
{
throw new NotImplementedException();
}

public override void Validate()
{
throw new NotImplementedException();
}
}
}
Oops, something went wrong.

0 comments on commit da5417b

Please sign in to comment.