首页 \ 问答 \ getChanges Sharepoint rest API(getChanges Sharepoint rest API)

getChanges Sharepoint rest API(getChanges Sharepoint rest API)

我正在使用Sharepoint 2013 REST api来查找根站点中发生的增量更改。 我的要求如下:

headers = {"Authorization": 'Bearer ' + access_token, "accept": "application/json", "odata": "verbose"}

    headers["content-type"] = "application/json;odata=verbose"
    body = { 'query': { '__metadata': { 'type': 'SP.ChangeQuery' },'Web': True, 'Update': True, 'Add': True,
            'ChangeTokenStart':{'__metadata':{'type':'SP.ChangeToken'}, 
                                'StringValue': '1;1;5b9752ee-f410-4cc6-9ab6-eb18c2ad802f;636252579049500000;89866182'}
                                }
            }

In response I am getting lot of changerequest objects. One of them is as below:

{
            u 'odata.type': u 'SP.ChangeWeb',
            u 'ChangeToken': {
                u 'StringValue': u '1;1;5b9752ee-f410-4cc6-9ab6-eb18c2ad802f;636252779425600000;89976872'
            },
            u 'WebId': u '6e21eadd-4155-494d-9a8e-1046865bdd4b',
            u 'ChangeType': 2,
            u 'odata.id': u 'https://<site url>/_api/SP.ChangeWeb87f1a9c6-937b-4507-973d-fc2d1b949aed',
            u 'SiteId': u '5b9752ee-f410-4cc6-9ab6-eb18c2ad802f',
            u 'odata.editLink': u 'SP.ChangeWeb87f1a9c6-937b-4507-973d-fc2d1b949aed',
            u 'Time': u '2017-03-16T16:19:02.56Z'

有人可以帮我理解回应吗? 我很难找到改变发生的路径。 此外,这会改变API捕获网站中子网站中发生的变化吗?

提前致谢


I am using Sharepoint 2013 REST api to find out the incremental changes that have happened in the root site. My request is like below:

headers = {"Authorization": 'Bearer ' + access_token, "accept": "application/json", "odata": "verbose"}

headers["content-type"] = "application/json;odata=verbose"
body = { 'query': { '__metadata': { 'type': 'SP.ChangeQuery' },'Web': True, 'Update': True, 'Add': True,
   'ChangeTokenStart':{'__metadata':{'type':'SP.ChangeToken'}, 
   'StringValue': '1;1;5b9752ee-f410-4cc6-9ab6-eb18c2ad802f;636252579049500000;89866182'}
     }
}

In response I am getting lot of changerequest objects. One of them is as below:

{
            'odata.type': 'SP.ChangeWeb',
            'ChangeToken': {
                'StringValue': '1;1;5b9752ee-f410-4cc6-9ab6-eb18c2ad802f;636252779425600000;89976872'
            },
            'WebId': '6e21eadd-4155-494d-9a8e-1046865bdd4b',
            'ChangeType': 2,
            'odata.id': 'https://<site url>/_api/SP.ChangeWeb87f1a9c6-937b-4507-973d-fc2d1b949aed',
            'SiteId': '5b9752ee-f410-4cc6-9ab6-eb18c2ad802f',
            'odata.editLink': 'SP.ChangeWeb87f1a9c6-937b-4507-973d-fc2d1b949aed',
            'Time': '2017-03-16T16:19:02.56Z'

Can somebody help me understand the response? I am facing difficulty to find out the path where the change happened. Also, would this getchanges API capture changes that has happened in subsites within the site?


原文:https://stackoverflow.com/questions/42839995
更新时间:2023-04-25 16:04

最满意答案

为什么要删除按钮中的约束? 您可以创建按钮Y约束的IBOutlet,然后更改该Y约束值,而不是删除约束

选择要更改的LayoutConstraint,然后将其拖动到.h文件中

选择要更改的LayoutConstraint,然后将其拖动到.h文件中

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *yAxisConstrain;

像这样改变你的Constrain值,

yAxisConstrain.constant = 0; //What ever the value you want.
[self.view layoutIfNeeded];

Why do you remove the constrains in your Button? instead of removing constrains, you can create an IBOutlet of the Button Y Constrain & then change that Y Constrain value

Select the LayoutConstraint you want to change, then control drag it to your .h file

Select the LayoutConstraint you want to change, then control drag it to your .h file

@property (nonatomic, weak) IBOutlet NSLayoutConstraint *yAxisConstrain;

Change your Constrain value like this,

yAxisConstrain.constant = 0; //What ever the value you want.
[self.view layoutIfNeeded];

相关问答

更多
  • 好的,你可以相当容易地做到这一点。 它基本上就像你用框架做的那样。 首先,您需要创建“变量”约束并将其保存到属性中。 你可以用代码做到这一点...... self.heightConstraint = [NSLayoutConstraint constraintWithItem:self.theView attribute: relatedBy: toItem: attribute: multiplier: constant:]; // set up the rest [self.view addCons ...
  • 但是在iOS 8上,这被多次调用! 在iOS 7上它被调用一次! 此外,在iOS 8中,ViewDidLayoutSubviews的LAST调用在放置图像方面是最准确的! 因此, 每次调用viewDidLayoutSubviews都会响应。 如果已添加图像视图,请不要再次添加 - 但必要时请重新定位。 然而,更好的方法是使用autolayout定位图像视图本身! 不是给它分配一个框架,而是给它约束。 现在,它将在剩余的时间内自动重新定位以响应视图布局。 But on iOS 8, this is calle ...
  • 您可以解决这个问题,而无需覆盖任何方法或设置任意的宽度约束。 您可以在Interface Builder中完成所有操作,如下所示。 内部按钮宽度是从标题宽度加上图标宽度加上左右内容边缘插入的。 如果一个按钮同时具有图像和文本,则它们以组为中心,之间不会有填充。 如果您添加了一个左边的内容插页,它是相对于文本计算的,而不是文本+图标。 如果您设置了一个负的左图像插入,图像被拉出左边,但整体按钮宽度不受影响。 如果您设置了一个负的左图像插入,实际布局使用该值的一半。 所以要获得一个-20点左边的插图,你必须在I ...
  • 您可以在函数- viewDidLayoutSubviews获取宽度。 Apple文档在这里。 You can get the width in the function - viewDidLayoutSubviews. Apple Documentation here.
  • 如果您使用的是自动布局,请在将新框架应用于按钮之前删除约束: [button removeConstraints:button.constraints]; [button setTranslatesAutoresizingMaskIntoConstraints:NO]; button.frame = CGRectMake(button.frame.origin.x, button.frame.origin.y + deltaY, button.frame.size.width, button.frame.s ...
  • 这不是一个真正的动态问题。 Autolayout与任何视图动画或框架的任何手动设置都不兼容:当布局出现时,它将遵守约束条件 。 如果您以任何方式手动移动视图,更新约束以匹配其新位置/大小/等等,由您决定。 话虽如此:使用UIKit Dynamics,当动画结束时,动画师将暂停,并通知动画师的代表: https://developer.apple.com/library/ios/documentation/uikit/reference/UIDynamicAnimatorDelegate_Protocol/R ...
  • 你不能使用vfl。 你必须使用这个方法...... AddConstraintForItem:属性:关系:toItem:属性:乘数:不变。 或者类似的东西。 两个项目可以相同,两个属性设置为一个宽度,一个设置为高度。 You can't use vfl for this. You have to use the method... AddConstraintForItem:attribute:relation:toItem:attribute:multiplier:constant. Or somethin ...
  • 为什么要删除按钮中的约束? 您可以创建按钮Y约束的IBOutlet,然后更改该Y约束值,而不是删除约束 选择要更改的LayoutConstraint,然后将其拖动到.h文件中 @property (nonatomic, weak) IBOutlet NSLayoutConstraint *yAxisConstrain; 像这样改变你的Constrain值, yAxisConstrain.constant = 0; //What ever the value you want. [self.view lay ...
  • 要让它们按比例缩放,请设置UIButton的backgroundImage属性而不是image属性。 使图像属性显示在标题旁边。 backgroundImage属性将缩放整个边界,内在大小应与您的UIImageView匹配。 希望这有助于解决您的问题。 To get them to scale the same set the backgroundImage property of the UIButton rather than the image property. The image property ...
  • Autolayout仅在布局传递后设置视图框架,它是具有循环的东西,并且不会在添加视图或修改约束时调用-setNeedsLayout ,这就是为什么有时需要在特定视图上调用-setNeedsLayout 。 另一点是,如果您不使用界面构建器或以编程方式创建约束,则autolayout会自动将视图自动调整掩码转换为约束(-translatesAutoresizingMaskIntoConstraints属性)。 在这种情况下,如果您设置文本,则强制视图表示其内在内容大小,基本上是标签的大小,如果内在内容大小与 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。