FBOpenGraphAction.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. * Copyright 2010-present Facebook.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FBGraphObject.h"
  18. @protocol FBGraphPlace;
  19. @protocol FBGraphUser;
  20. /*!
  21. @protocol
  22. @abstract
  23. The `FBOpenGraphAction` protocol is the base protocol for use in posting and retrieving Open Graph actions.
  24. It inherits from the `FBGraphObject` protocol; you may derive custome protocols from `FBOpenGraphAction` in order
  25. implement typed access to your application's custom actions.
  26. @discussion
  27. Represents an Open Graph custom action, to be used directly, or from which to
  28. derive custom action protocols with custom properties.
  29. */
  30. @protocol FBOpenGraphAction<FBGraphObject>
  31. /*!
  32. @abstract use objectID instead
  33. @deprecated use objectID instead
  34. */
  35. @property (retain, nonatomic) NSString *id __attribute__ ((deprecated("use objectID instead")));
  36. /*!
  37. @property
  38. @abstract Typed access to the action's ID.
  39. @discussion Note this typically refers to the "id" field of the graph object (i.e., equivalent
  40. to `[self objectForKey:@"id"]`) but is differently named to avoid conflicting with Apple's
  41. non-public selectors.
  42. */
  43. @property (retain, nonatomic) NSString *objectID;
  44. /*!
  45. @property
  46. @abstract Typed access to action's start time
  47. */
  48. @property (retain, nonatomic) NSString *start_time;
  49. /*!
  50. @property
  51. @abstract Typed access to action's end time
  52. */
  53. @property (retain, nonatomic) NSString *end_time;
  54. /*!
  55. @property
  56. @abstract Typed access to action's publication time
  57. */
  58. @property (retain, nonatomic) NSString *publish_time;
  59. /*!
  60. @property
  61. @abstract Typed access to action's creation time
  62. */
  63. @property (retain, nonatomic) NSString *created_time;
  64. /*!
  65. @property
  66. @abstract Typed access to action's expiration time
  67. */
  68. @property (retain, nonatomic) NSString *expires_time;
  69. /*!
  70. @property
  71. @abstract Typed access to action's ref
  72. */
  73. @property (retain, nonatomic) NSString *ref;
  74. /*!
  75. @property
  76. @abstract Typed access to action's user message
  77. */
  78. @property (retain, nonatomic) NSString *message;
  79. /*!
  80. @property
  81. @abstract Typed access to action's place
  82. */
  83. @property (retain, nonatomic) id<FBGraphPlace> place;
  84. /*!
  85. @property
  86. @abstract Typed access to action's tags
  87. */
  88. @property (retain, nonatomic) NSArray *tags;
  89. /*!
  90. @property
  91. @abstract Typed access to action's image(s)
  92. */
  93. @property (retain, nonatomic) id image;
  94. /*!
  95. @property
  96. @abstract Typed access to action's from-user
  97. */
  98. @property (retain, nonatomic) id<FBGraphUser> from;
  99. /*!
  100. @property
  101. @abstract Typed access to action's likes
  102. */
  103. @property (retain, nonatomic) NSArray *likes;
  104. /*!
  105. @property
  106. @abstract Typed access to action's application
  107. */
  108. @property (retain, nonatomic) id<FBGraphObject> application;
  109. /*!
  110. @property
  111. @abstract Typed access to action's comments
  112. */
  113. @property (retain, nonatomic) NSArray *comments;
  114. @end