Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - modifications API 1.1 Trends #67

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
86 changes: 0 additions & 86 deletions Twitterizer2/Methods/Trends/DailyTrendsCommand.cs

This file was deleted.

60 changes: 1 addition & 59 deletions Twitterizer2/Methods/Trends/TwitterTrend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,64 +173,6 @@ public static TwitterResponse<TwitterTrendLocationCollection> Available()
{
return Available(null, null);
}


/// <summary>
/// Gets the daily global trends
/// </summary>
/// <param name="tokens">The request tokens.</param>
/// <param name="options">The options.</param>
public static TwitterResponse<TwitterTrendDictionary> Daily(OAuthTokens tokens, TrendsOptions options)
{
Commands.DailyTrendsCommand command = new Twitterizer.Commands.DailyTrendsCommand(tokens, options);

return Core.CommandPerformer.PerformAction(command);
}

/// <summary>
/// Gets the daily global trends
/// </summary>
/// <param name="options">The options.</param>
public static TwitterResponse<TwitterTrendDictionary> Daily(TrendsOptions options)
{
return Daily(null, options);
}

/// <summary>
/// Gets the daily global trends
/// </summary>
public static TwitterResponse<TwitterTrendDictionary> Daily()
{
return Daily(null, null);
}

/// <summary>
/// Gets the weekly global trends
/// </summary>
/// <param name="tokens">The request tokens.</param>
/// <param name="options">The options.</param>
public static TwitterResponse<TwitterTrendDictionary> Weekly(OAuthTokens tokens, TrendsOptions options)
{
Commands.WeeklyTrendsCommand command = new Twitterizer.Commands.WeeklyTrendsCommand(tokens, options);

return Core.CommandPerformer.PerformAction(command);
}

/// <summary>
/// Gets the weekly global trends
/// </summary>
/// <param name="options">The options.</param>
public static TwitterResponse<TwitterTrendDictionary> Weekly(TrendsOptions options)
{
return Weekly(null, options);
}

/// <summary>
/// Gets the weekly global trends
/// </summary>
public static TwitterResponse<TwitterTrendDictionary> Weekly()
{
return Weekly(null, null);
}

}
}
6 changes: 4 additions & 2 deletions Twitterizer2/Methods/Trends/TwitterTrendLocationCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist

case "placeType":
int placetypeDepth = reader.Depth;
while (reader.Read() && reader.Depth > placetypeDepth)
while (reader.Read() && reader.Depth == placetypeDepth)
{
if (reader.TokenType == JsonToken.StartObject && reader.Depth >= 2)
if (reader.TokenType == JsonToken.StartObject && reader.Depth >= 2){
result[result.Count - 1].PlaceType = new TwitterTrendLocationPlaceType();
placetypeDepth = 3;
}

if (reader.TokenType == JsonToken.PropertyName)
{
Expand Down
86 changes: 0 additions & 86 deletions Twitterizer2/Methods/Trends/WeeklyTrendsCommand.cs

This file was deleted.