Skip to content

Instantly share code, notes, and snippets.

// Create a TentFeedRequest to retrieve the messages for this conversation.
var request = feedRequestFactory
.MakeAuthenticatedSessionRequest<TentPostMessage>(this.conversation.DbId + "_messages")
.AddTypes(MessengerPostTypes.Message)
.AddMentions(this.conversation)
.AddLimit(50);
// Use the message manager to perform this request.
this.messagesManager.Request = request;
await this.messagesManager.LoadAsync();
var refreshRequest = feedRequestFactory.MakeAuthenticatedSessionRequest<object>()
.AddTypes(MessengerPostTypes.Conversation, MessengerPostTypes.Message)
.AddProfiles(TentFeedRequestProfiles.Entity | TentFeedRequestProfiles.Mentions)
.SortBy(TentFeedRequestSort.VersionReceivedAt)
.AddPostBoundary(lastPost, TentFeedRequestBoundaryType.Since);
await this.tentClient.PerformFeedRequestAsync(refreshRequest);
{"entity":"https://quentez.campr.me","id":"23dafd1876b344fc99474d46211c5463","mentions":[{"entity":"https://quentez.cupcake.is"}],"published_at":1395010412730,"type":"https://tent.io/types/relationship/v0#initial","version":{"published_at":1395010412730}}
REQUEST:
HEAD https://campr.me/quentez/posts?before=1392660715119&until=1392660711650&sort_by=published_at
Authorization: Hawk id="3863120e162d43b0ac112a5d6b82fb1d", ts="1392660723", nonce="15246183", mac="SaXj4CP2zkOIYk7+bmmLHYcs23ABolnA8gRF4qjMEXc="
RESPONSE:
200
cache-control: no-cache
REQUEST:
GET https://campr.me/quentez/posts/https%3A%2F%2Fquentez.campr.me/b72b3459ed954c0ba31ec44a0ed82912?bewit=NTJmZWFiYmM3NjFhNGQyY2Q4OTdhMTE4XDEzOTI0MjM2MjBcaEJTT0VFQjRPNzNmZCt4OXZ2MUdJT1FqWkxXMTdzTjBHSytzcE8rMzVYZz1c
RESPONSE:
200
cache-control: no-cache
pragma: no-cache
{
"id": "5cafcd61258d4f3f9b59370cbbfc6ac5",
"entity": "https://quentez.campr.me",
"published_at": 1391880246073,
"type": "https://tent.io/types/delete/v0#",
"version": {
"id": "sha512t256-058e001a40373fc1e34c383893adf412bd725ea5fcaa0b9a88c79dd101b91956",
"published_at": 1391880246073,
},
"mentions": [
@quentez
quentez / Original.json
Last active August 29, 2015 13:55
Version Id Mismatch
{
"app": {
"name": "Status",
"url": "https://apps.cupcake.io/status"
},
"content": {
"text": "I'm spoiled. I want to be able to talk to all my friends instantly, ubiquitously and securely.\nMy parents only had telephones and the postal service growing up..."
},
"entity": "https://mattl.cupcake.is",
"id": "ythILoV9JXiEbS-XxnN9Uw",
{"app":{"name":"Status","url":"https://apps.cupcake.io/status"},"content":{"text":"I'm spoiled. I want to be able to talk to all my friends instantly, ubiquitously and securely.\nMy parents only had telephones and the postal service growing up..."},"entity":"https://mattl.cupcake.is","id":"ythILoV9JXiEbS-XxnN9Uw","published_at":1391000453129,"type":"https://tent.io/types/status/v0#","version":{"published_at":1391000453129}}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Extentions
{
public static class StringExtensions
{
static List<char> diacriticsSurrogates = new List<char> { 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'c', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 't', 'y', 'y', 's', 'b', 'd', 'n', 'm', ' ', ' ', ' ', ' ', ' ' };
@quentez
quentez / site.js
Created April 7, 2012 00:50
Fixed dynamic header for MahApps.Metro documentation.
(function () {
var nb = document.createElement('script');
nb.type = 'text/javascript';
nb.async = true;
nb.src = 'http://s.prabir.me/nuget-button/0.2.1/nuget-button.min.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(nb, s);
})();
(function($) {