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

no textile messages get Method in MessagesApi? #89

Open
SWBMESSI opened this issue Nov 22, 2019 · 3 comments
Open

no textile messages get Method in MessagesApi? #89

SWBMESSI opened this issue Nov 22, 2019 · 3 comments

Comments

@SWBMESSI
Copy link

//
// MessagesApi.h
// Textile
//
// Created by Aaron Sutula on 3/1/19.
// Copyright © 2019 Textile. All rights reserved.
//

#import <TextileCore/View.pbobjc.h>
#import "NodeDependant.h"

NS_ASSUME_NONNULL_BEGIN

/**

  • Provides access to Textile messages related APIs
    */
    @interface MessagesApi : NodeDependant

/**

  • Add a text message to a thread
  • @param threadId The id of the thread to add the message to
  • @param body The body of the message
  • @param error A reference to an error pointer that will be set in the case of an error
  • @return The hash of the newly created message block
    */
  • (NSString *)add:(NSString *)threadId body:(NSString *)body error:(NSError **)error;

/**

  • List messages for a thread
  • @param offset The offset to query from
  • @param limit The max number of messages to return
  • @param threadId The id of the thread to query
  • @param error A reference to an error pointer that will be set in the case of an error
  • @return An object containing a list of messages
    */
  • (TextList *)list:(nullable NSString *)offset limit:(long)limit threadId:(NSString *)threadId error:(NSError **)error;

@EnD

NS_ASSUME_NONNULL_END

@asutula
Copy link
Member

asutula commented Nov 22, 2019

Hi @SWBMESSI, the current API only provides the list of messages because the use case it was developed for was the "feed" type of UX in Textile Photos. I believe it would be pretty easy to provide a method to get a single message. Let me look into that all I'll let you know.

@SWBMESSI
Copy link
Author

Hi @SWBMESSI, the current API only provides the list of messages because the use case it was developed for was the "feed" type of UX in Textile Photos. I believe it would be pretty easy to provide a method to get a single message. Let me look into that all I'll let you know.

thx , i tried to create a method in go-textile but i got something wrong when run " make ios" ,Need to install a lot of packages . Looking forward to your code.Thanks again.

@asutula
Copy link
Member

asutula commented Dec 2, 2019

Started to implement this in our core library, will update mobile sdks once this is merged textileio/go-textile#945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants